Git可以在结账后还原未分档的文件 [英] Git is it possible to revert unstaged files after a checkout

查看:109
本文介绍了Git可以在结账后还原未分档的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



直到这部分我没有提交任何文件。

最重要的是,我为前一次提交进行了结账。



现在我的所有更改都已丢失。



有没有一种方法可以恢复这些未提交文件的更改。

解决方案

未被跟踪的文件(当没有被 git stash -u )不能由Git恢复,因为它从来不知道它们。


I accidently deleted a file which had many changes along with other modifications in others files.

Till this part I didn't commit any files.

On top of that I did a checkout to my previous commit.

Now all my changes are lost.

Is there a way I can recovered the changed for these un-committed files.

解决方案

Untracked files (when not stashed away with git stash -u) cannot be recovered by Git, because it did never know anything about them.

这篇关于Git可以在结账后还原未分档的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆