在尝试使用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,我得到一个错误,说我的本地更改将被checkout覆盖。
我是不是做错了什么或者误解了git-bisect的工作原理?有什么解决这个问题的方法吗?谢谢!
发布于 2012-10-03 01:41:36
您可能应该输入git bisect reset HEAD命令来清除二等分状态并返回到原始头
发布于 2012-10-06 04:16:52
我希望您的gitignore文件在两个版本之间发生了变化,所以git现在认为这4个文件与它期望的不同。
尝试使用带有适当选项的“`git diff”缓存,如-- (man page)用于gitignore、排除文件和那些修改过的文件。
发布于 2015-03-13 07:26:56
除了.gitignore更改之外,如果您有一些其他进程在运行,不断生成这些文件,您也可以获得此更改。
https://stackoverflow.com/questions/12694952
复制相似问题