我试图找回我的工作。我愚蠢地使用了git reset --hard
,但在那之前我只进行了git add .
操作,没有进行git commit
。请帮忙!下面是我的日志:
MacBookPro:api user$ git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
# modified: .gitignore
...
MacBookPro:api user$ git reset --hard
HEAD is now at ff546fa added new strucuture for api
在这种情况下,是否有可能撤销git reset --hard
的操作?
find .git/objects/ -type f -printf '%TY-%Tm-%Td %TT %p\n' | sort
对我有用。日期也会显示,从结尾开始检查 blobs。 - ZAky