[英]How can I undo “unstage changes”
By mistake I got rid of some of my work by clicking "unstage changes" in vs code, after they were already staged. 错误地,我已经通过单击vs代码中的“取消更改”来摆脱了我的一些工作。 Is there any way to get them back?
有什么办法让他们回来吗?
Yes - when you stage changes, the file is added to the object database and a reference to that file is recorded in the index. 是的-当您进行更改时,文件将添加到对象数据库,并且对该文件的引用将记录在索引中。 You can use the
git-recover
tool to identify files that were added to the repository (staged) but are no longer referenced, and recover them to the working directory. 您可以使用
git-recover
工具来识别已添加到存储库(暂存)但不再被引用的文件,并将它们恢复到工作目录。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.