2

I had two git branches parallel to the master branch. Over time changes between branches had been merged back and forth which caused a way to complicated history, but that's nothing I can change now. What happened is, that some method M existed in branch B, which has been merged into master. "Most" of B is in master, but I'm missing method M. It probably got "lost" in a "wrong" merge. Trying to figure out, where it happened, I tried:

git log -S"def M"

and also

git log -G"def M"

I see the commit where the method has been introduced in the output, but not where it has been removed. Any hint what I might be doing wrong?

Achim
  • 15,415
  • 15
  • 80
  • 144

1 Answers1

0

This link may help you to find what you're looking for: git-bisect

This command is absolutely amazing when we need to find a specific commit. You simply defined the scope of the bisect and git automatically start the process by checking out a commit and wait on your feedback. At every step you check the desired method and git-bisect will get you at the exact commit where the problem started.

Hope this will help you to solve your problem.

Joël Salamin
  • 3,538
  • 3
  • 22
  • 33