我在尝试使用git-bisect在jquery git存储库中查找特定更改时遇到了奇怪的问题:二分命令似乎会创建修改后的文件,阻止了二分过程的继续进行。以下是我首先运行的命令:
git clone https://github.com/jquery/jquery.git
cd jquery
git bisect start
git bisect bad
git bisect good 2aa67026ebe6bea90fd137fc99b4c9422977e3f0
在这一点上,我会得到输出:
Bisecting: 1977 revisions left to test after this (roughly 11 steps)
[3e5520fbdc7231b3f38e145020b40524c1e6654d] Tagging the 1.4.3rc2 release.
但现在,当我运行 git status
命令时,输出结果如下:
# Not currently on any branch.
# You are currently bisecting.
# (use "git bisect reset" to get back to the original branch)
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: build/google-compiler-20091218.jar
# modified: build/js.jar
# modified: test/data/text.php
# modified: test/delegatetest.html
#
有四个文件显示为已修改。如果我运行 git bisect bad
,就会出现一个错误提示:我的本地更改将被检出覆盖。
我是否做错了什么或者误解了 git-bisect
的工作原理?有没有解决这个问题的方法?谢谢!