不能“git bisect reset”;无尽的存储/重置循环

时间:2015-12-05 01:23:07

标签: git

在一分为二之后,我想恢复正常状态并恢复最新版本。

但是,git git bisect reset 会抱怨某些具有本地更改的文件会被结帐覆盖,而且我应该先隐藏

存储并再次尝试重置抱怨一些不同的文件将被覆盖,我应该藏匿。存储一个让我回到第一个错误,依此类推等等。

git stash; git bisect reset

错误:文件A,B和C将被覆盖。请藏匿

git stash; git bisect reset

错误:文件D将被覆盖。请藏匿

git stash; git bisect reset

错误:文件A,B和C将被覆盖。请藏匿

git stash; git bisect reset

错误:文件D将被覆盖。请藏匿

等等。我想清除所有的bisecting并返回到最新的提交。

有什么想法吗?

[完整成绩单]

   powerpro:source_build danny$ git stash ; git bisect reset
Saved working directory and index state WIP on (no branch): 01993b2 tsAnalysis changed to little Endian (htonl() etc)
HEAD is now at 01993b2 tsAnalysis changed to little Endian (htonl() etc)
error: Your local changes to the following files would be overwritten by checkout:
    src/ep/dtapiTsp/dtapibridge/include/DtCommon.h
    src/ep/dtapiTsp/dtapibridge/include/DtPortAsi.h
    src/ep/dtapiTsp/dtapibridge/src/DtPortAsi.cpp
Please, commit your changes or stash them before you can switch branches.
Aborting
Could not check out original HEAD '37c9eb1f56b0669b8382c1c3af68cfb73f6758b3'.
Try 'git bisect reset <commit>'.
powerpro:source_build danny$ git stash ; git bisect reset
Saved working directory and index state WIP on (no branch): 01993b2 tsAnalysis changed to little Endian (htonl() etc)
HEAD is now at 01993b2 tsAnalysis changed to little Endian (htonl() etc)
error: Your local changes to the following files would be overwritten by checkout:
    src/ep/dtapiTsp/DtapiBridge/src/DtPortAsi.cpp
Please, commit your changes or stash them before you can switch branches.
Aborting
Could not check out original HEAD '37c9eb1f56b0669b8382c1c3af68cfb73f6758b3'.
Try 'git bisect reset <commit>'.
powerpro:source_build danny$ git stash ; git bisect reset
Saved working directory and index state WIP on (no branch): 01993b2 tsAnalysis changed to little Endian (htonl() etc)
HEAD is now at 01993b2 tsAnalysis changed to little Endian (htonl() etc)
error: Your local changes to the following files would be overwritten by checkout:
    src/ep/dtapiTsp/dtapibridge/include/DtCommon.h
    src/ep/dtapiTsp/dtapibridge/include/DtPortAsi.h
    src/ep/dtapiTsp/dtapibridge/src/DtPortAsi.cpp
Please, commit your changes or stash them before you can switch branches.
Aborting
Could not check out original HEAD '37c9eb1f56b0669b8382c1c3af68cfb73f6758b3'.
Try 'git bisect reset <commit>'.
powerpro:source_build danny$ git stash ; git bisect reset
Saved working directory and index state WIP on (no branch): 01993b2 tsAnalysis changed to little Endian (htonl() etc)
HEAD is now at 01993b2 tsAnalysis changed to little Endian (htonl() etc)
error: Your local changes to the following files would be overwritten by checkout:
    src/ep/dtapiTsp/DtapiBridge/src/DtPortAsi.cpp
Please, commit your changes or stash them before you can switch branches.
Aborting
Could not check out original HEAD '37c9eb1f56b0669b8382c1c3af68cfb73f6758b3'.
Try 'git bisect reset <commit>'.

1 个答案:

答案 0 :(得分:3)

我认为问题是您与之前的HEAD(当您启动bisect时)和bisect HEAD的当前状态(可能是一些未跟踪的文件)发生了不兼容的更改。

您可以重置所有内容并重新开始

git bisect reset HEAD    
git checkout your_branch --force
git reset HEAD --hard

然后,您应该使用git status检查任何未跟踪的文件,如果有,请解决它们。我打赌你会找到一个现在存在的文件,但在之前的提交中被删除了。