I have a Git repository with n commits.
(我有一个带有n次提交的Git存储库。)
I have a file that I need, and that used to be in the repository, and that I suddenly look for and think "Oh! Where'd that file go?"
(我有一个我需要的文件,而且曾经存放在存储库中,我突然想到并想“哦!那个文件去哪了?”)
Is there a (series of) Git command(s) that will tell me that "file really_needed.txt was deleted at commit n-13"?
(是否有(系列)Git命令会告诉我“在提交n-13时删除了文件really_needed.txt”?)
In other words, without looking at every individual commit, and knowing that my Git repo has every change of every file, can I quickly find the last commit that HAS that file, so I can get it back?
(换句话说,如果不查看每个单独的提交,并且知道我的Git repo对每个文件进行了每次更改,我是否可以快速找到该文件的最后一次提交,以便我可以将其恢复?)
ask by JohnMetta translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…