在Mercurial中使用hg还原 [英] Using hg revert in Mercurial
问题描述
我正在使用Mercurial.我克隆了一个存储库.为了调试,我在java文件中更改了几行代码.不过,我没有提交这些更改.我只想将它们恢复为原始状态(如存储库中所示).我尝试了hg revert filename.java
,它确实将其还原,但是现在当我执行hg status
时,我现在看到在文件夹中添加了其他文件,例如:
I'm using Mercurial. I made a clone of a repository. For debugging, I changed a few lines of code in a java file. I did not commit those changes though. I just want to revert them back to their original state, as found in the repository. I tried hg revert filename.java
, which did revert it, but now when I do hg status
, I see additional files added in my folder now like:
? filename.java.orig
我可以只删除那些文件吗,为什么在使用还原时Mercurial会把它们制作出来?
Can I just delete those files, and why does Mercurial make them when I use revert?
推荐答案
是的,您可以删除它们.如果您还原了原本不想还原的内容,这是一项安全功能.
Yes, you can delete them. It's a safety feature in case you reverted something you didn't mean to revert.
这篇关于在Mercurial中使用hg还原的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!