Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I stop git bisect?

Tags:

git

bisect

I tried git bisect a while ago and it helped me well, but apparently I didn't stop it. When I do git status I still get:

You are currently bisecting. (use "git bisect reset" to get back to the original branch) 

I don't really want to reset to anywhere, I just want to stop bisecting. It's really just a matter of getting rid of this message.

like image 926
kodu Avatar asked Apr 18 '14 14:04

kodu


People also ask

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

If you just want to stop bisecting without changing the commit, from the documentation, git bisect reset HEAD would do what you want.

Bisect reset

After a bisect session, to clean up the bisection state and return to the original HEAD (i.e., to quit bisecting), 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.)

With an optional argument, you can return to a different commit instead:

$ git bisect reset <commit>

For example, git bisect reset HEAD will leave you on the current bisection commit and avoid switching commits at all, while git bisect reset bisect/bad will check out the first bad revision.

Source: http://git-scm.com/docs/git-bisect

like image 137
Leigh Avatar answered Oct 06 '22 12:10

Leigh