128

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.

kodu
  • 2,176
  • 3
  • 17
  • 22

2 Answers2

172

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

Community
  • 1
  • 1
Leigh
  • 12,038
  • 4
  • 28
  • 36
  • 2
    Thanks, it worked. I'm not sure if 'git bisect reset HEAD' also has this, but when I did 'git bisect reset ' I was in detached head, so I had to re-checkout my branch. – kodu Apr 18 '14 at 14:53
  • So when i made a commit and pushed this commit, during a bisect. What do i have to do, to end bisecting and stay on my new commit (HEAD) ? – Gobliins Apr 17 '18 at 11:40
  • 2
    @Goblins `git bisect reset HEAD` – penguin359 Feb 05 '19 at 21:20
6

If git bisect reset does not work for you, just remove the bisect file:

$ rm -v .git/BISECT_*
removed '.git/BISECT_ANCESTORS_OK'
removed '.git/BISECT_LOG'
removed '.git/BISECT_NAMES'
removed '.git/BISECT_START'
removed '.git/BISECT_TERMS'
Shijing Lv
  • 6,286
  • 1
  • 20
  • 12