git bisect
git bisect
Catching the commit which introduced a bug with git-bisect
Manually marking commits
git bisect start HEAD <SHA-1> --- This marks
<SHA-1>as the first place we know there isnβt bugs, andHEADas the place where we know the bug is present. We will start at the midway of all the commitsgit bisect goodwill mark the commit to not have bugs and move to the next sectiongit bisect badwill mark the commit to have bugs
git bisect reset
Marking commits with run
git bisect start HEAD <SHA-1> --git bisect run <cmd>git bisect reset
Example
git bisect start HEAD HEAD~10 --git bisect run yarn testgit bisect reset