Last active
August 13, 2019 19:00
-
-
Save cletusw/7d2c8614a4a20fc27ad6 to your computer and use it in GitHub Desktop.
git bisect run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Quick git tip: Most of you know (and love) git's "bisect" command, but how many have used "git bisect run"? Specify a shell script/command, and git will automatically run it on each bisect step. If it exits with a 0, the commit is marked "good". Anything else, and the commit is marked "bad". | |
For example, want to find the cause of a failing test? | |
git bisect start <failing commit> <passing commit> | |
git bisect run sh -c '(cd app && grunt test)' | |
Voila! Git will automatically find the first commit in the given range that fails the tests. | |
http://git-scm.com/docs/git-bisect#_bisect_run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment