我手头没有具体的问题,但我在过去遇到过一些我不小心炸毁索引的情况,并希望我可以回到给定文件的先前状态,该状态在某个时候被索引。
一些示例是:
$ git add <file>
# find out that I already had an indexed version of <file>,
# and that for some reason I shouldn't have added the extra modifications
$ git stash pop
# find out afterwards that I have a mix of "the index I had"
# and "the index in the stash"
$ git stash
# with an active index, which is now mixed with the state of the working tree
$ git reset <typo>
# accidentally resetting the wrong file, or the whole directory
可以求助于挖掘git fsck --full --unreachable --no-reflog
(如建议here),我想知道是否有更方便的方法来做到这一点。
问题 :
索引是否有某种 reflog ?