mercurial和svn_Mercurial:批量添加和删除所有文件

mercurial和svn

While I much prefer git and the GitHub workflow, Firefox's codebase (mozilla-central) is store in a mercurial repository.  There are tools that wrap mercurial so you can use a git-like interface, like git-cinnabar, but my philosophy is to learn the root tool so that I know what's going on every step of the way.  Imagine losing work to an abstraction problem -- that would be terrible!

尽管我更喜欢git和GitHub工作流,但Firefox的代码库( mozilla-central )存储在一个专业的存储库中。 有一些工具可以打包,所以您可以使用git-cinnabar之类的git界面,但是我的理念是学习根工具,以便我了解该过程的每个步骤。 想象一下,由于一个抽象问题而失去工作,那将是可怕的!

One task you need accomplish is adding and removing files during the commit process, which is easy enough:

您需要完成的一项任务是在提交过程中添加和删除文件,这很容易:


# Add file
hg add path/to/file

# Remove missing file
hg remove path/to/file


When there are many files being added and some being removed, you want to be very careful, but adding and removing files one by one can be time-consuming.  Once you've confirmed you want to add new files and remove missing files, you can run the following:

当要添加许多文件而要删除一些文件时,您要非常小心,但是一一添加和删除文件会很耗时。 确认要添加新文件并删除丢失的文件后,可以运行以下命令:


# Add new files, remove missing
hg addremove


If you only want to remove missing files, you can execute the following:

如果只想删除丢失的文件,则可以执行以下操作:


hg remove --after


I know that git branching and mercurial bookmarks are very similar, but I have much less confidence in my mercurial skills, so I'm always ultra careful not to mess up my commits.  Good luck!

我知道git分支和Mercurial书签非常相似,但是我对自己的Mercury技能信心不足,因此我总是非常小心,不要弄乱我的提交。 祝好运!

翻译自: https://davidwalsh.name/mercurial-mass-add-remove-files

mercurial和svn

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值