#git #merge

How to find the commit that broke something after a merge in Git?

SOLUTION: Git offers a great binary search facility in the form of git-bisect. First you have to perform the initial setup: • git bisect start #starts the bisecting session • git bisect bad #marks the current revision as bad • git bisect good revision #marks the last known good revision After this git will automatically checkout a revision halfway between the known “good” and “bad” versions. Specs can be run again and commit can be marked as “good” or “bad” accordingly. • git bisect good # or git bisec bad This process continues until we get to the commit that introduced the bug.

Taggings:

Subscribe to #git #merge