gpt4 book ai didi

git-bisect 创建修改后的文件

转载 作者:太空狗 更新时间:2023-10-29 14:24:22 24 4
gpt4 key购买 nike

当我尝试使用 git-bisect 查找 jquery git 存储库中的特定更改时,我遇到了一个奇怪的问题:bisect 命令似乎创建了修改后的文件,阻止了 bisect 过程继续进行。这些是我首先运行的命令:

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,我会收到一条错误消息,指出我的本地更改将被 check out 覆盖。

我是不是做错了什么或者误解了 git-bisect 的工作原理?这个问题有什么解决方法吗?谢谢!

最佳答案

你可能应该输入git bisect reset HEAD命令来清理二分状态并返回到原来的HEAD

关于git-bisect 创建修改后的文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12694952/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com