Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Abort Git Bisect

I started my git bisect by specifying good and bad revisions but I don't think they registered. Additionally, as I am attempting to specify git bisect good and bad, I don't think git is doing anything. I would like to abort the entire bisect so that I can re-initiate the operation. git bisect reset seems to be what I am looking for, but I want to double check before potentially messing anything up.

like image 923
Stunner Avatar asked Oct 25 '13 01:10

Stunner


People also ask

How do I get out of bisect?

git bisect reset is how you stop bisecting. By default it will reset the HEAD to where it was before you started, although you can also use git bisect reset <commit> to go to that one instead.

How do I remove a bad commit in git bisect?

Use git log to check the previous commits. Use Git Bisect to find the commit in which line 2 is changed from 'b = 20' to 'b = 0.00000'. Remove the bad commit by using Git Revert. Leave the commit message as is.


1 Answers

git bisect reset is the correct command. From the documentation:

After a bisect session, to clean up the bisection state and return to the original HEAD, issue the following command:

$ git bisect reset 

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.)

like image 71
Greg Hewgill Avatar answered Oct 09 '22 23:10

Greg Hewgill