hg忘了和hg删除有什么区别? [英] What is the difference between hg forget and hg remove?

查看:327
本文介绍了hg忘了和hg删除有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望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.

forgetremove有什么区别,它们可以做什么吗?

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忘了和hg删除有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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