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