hg Forget 和 hg remove 有什么区别? [英] What is the difference between hg forget and hg remove?
问题描述
我希望 mercurial 从存储库的当前状态中删除几个文件.但是,我希望文件存在于先前的历史记录中.
I want mercurial to remove several files from the current state of the repository. However, I want the files to exist in prior history.
forget
和 remove
有什么区别,能不能如我所愿?
How do forget
and remove
differ, and can they do what I want?
推荐答案
'hg forget
' 只是 'hg remove -Af
' 的简写.来自hg remove
"帮助:
'hg forget
' is just shorthand for 'hg remove -Af
'. From the 'hg remove
' help:
...和 -Af 可用于删除文件从下一个修订版没有从工作中删除它们目录.
...and -Af can be used to remove files from the next revision without deleting them from the working directory.
底线:remove
"从磁盘上的工作副本中删除文件(除非您使用-Af
)和forget
"没有.
Bottom line: 'remove
' deletes the file from your working copy on disk (unless you uses -Af
) and 'forget
' doesn't.
这篇关于hg Forget 和 hg remove 有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!