还有可能在git中恢复已删除的未跟踪文件? [英] Is it still possible to restore deleted untracked files in git?
本文介绍了还有可能在git中恢复已删除的未跟踪文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
pre code git reset --hard
是否有可能在这种情况下恢复已删除的文件?
解决方案
一些更好的IDE会将您的文件作为本地历史记录进行跟踪。如果你从外部删除了文件(比如说, git reset
),你应该可以在父目录的IDE中单击并选择与本地历史进行比较。
$ b
我在 PHPStorm
IDE中成功使用了此功能,当我的未跟踪文件被某个实用程序清除时...
let's say yesterday I did some changes on my master branch, and I forgot to add, commit them. and in the morning i did
git reset --hard
is it possible to restore deleted files in this situation ?
解决方案
Some better IDEs keep track of your files as a local history. If you removed files externally (say, git reset
) you should be able to click in your IDE on parent directory and choose "Compare with local history".
I used this feature successfully in PHPStorm
IDE when my untracked files got wiped out by some utility...
这篇关于还有可能在git中恢复已删除的未跟踪文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文