[英]How to convert local git repository back to vs2015 project files?
Usually checking git status
tells you what you need to do, for it tells you every file that has changed. 通常检查
git status
告诉您您需要做什么,因为它会告诉您每个已更改的文件。 So, if your files where deleted, all you have to do is 因此,如果您的文件已删除,那么您要做的就是
git checkout -- .
This will revert all uncommitted changes. 这将还原所有未提交的更改。 If, however, the changes where committed, you can do
但是,如果更改已提交,则可以执行
git reset --hard HEAD^
Please note that the second line of code I presented will send you back one commit prior to the one you're in (HEAD), with no (trivial) way of undoing. 请注意,我提供的第二行代码将向您发送回一个提交,比您在(HEAD)中的提交要早,并且没有(平凡的)撤消方式。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.