Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undoing a git bisect mistake

Tags:

git

git-bisect

People also ask

How do I remove a git bisect?

If you just want to stop bisecting without changing the commit, from the documentation, git bisect reset HEAD would do what you want. By default, this will return your tree to the commit that was checked out before git bisect start. (A new git bisect start will also do that, as it cleans up the old bisection state.)

Does git bisect update submodules?

In other words there's no "global" git bisect as there would be with submodules. This stops you from automatically finding a problem in one of the submodule repos if there are dependencies betweeen the problematic repo and other repositories.


From the git-bisect documentation:

Bisect log and bisect replay

After having marked revisions as good or bad, issue the following command to show what has been done so far:

$ git bisect log

If you discover that you made a mistake in specifying the status of a revision, you can save the output of this command to a file, edit it to remove the incorrect entries, and then issue the following commands to return to a corrected state:

$ git bisect reset
$ git bisect replay that-file

You can output a record of what was done using

$ git bisect log > bisect.log

Open that file in an editor and edit/remove the faulty line. Then you can replay it with

$ git bisect replay bisect.log

This is documented in git help bisect.