How do I stop 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.

29760 次浏览

git bisect reset是停止二分法的方法。默认情况下,它会将 HEAD 重置为开始之前的位置,不过您也可以使用 git bisect reset <commit>转到那个位置。

如果您只是想停止对分而不改变提交,那么从文档来看,git bisect reset HEAD可以做您想做的事情。

一分为二重置

在一个二分会话之后,为了清理二分状态并返回到原始的 HEAD (即,退出二分) ,发出以下命令:

$ git bisect reset

默认情况下,这会将您的树返回到在 git 对分开始之前签出的提交。(一个新的 git 平分开始也会这样做,因为它会清除旧的平分状态。)

使用可选参数,您可以返回不同的提交:

$ git bisect reset <commit>

例如,git bisect reset HEAD会让你在当前的二分提交和避免切换提交,而 git 二分重置二分/坏将检出第一个坏的修订。

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

如果 git bisect reset对您不起作用,只需删除对分文件:

$ 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'