【发布时间】:2010-11-13 07:25:32
【问题描述】:
灵感来自Git for beginners: The definitive practical guide。
这是关于初学者实用使用 Mercurial 的信息汇编。
初学者 - 接触过源代码控制但不是很了解的程序员。
实用 - 涵盖大多数用户经常遇到的情况 - 创建存储库、分支、合并、从/向远程存储库拉/推等。
注意事项:
- 解释如何完成某事而不是如何完成某事 已实施。
- 每个答案处理一个问题。
- 尽可能简洁明了地回答。
- 编辑/扩展现有答案,而不是在 同一主题。
- 请提供指向Mercurial wiki 或HG Book 的链接以供想要了解更多信息的人使用。
问题:
安装/设置
- How to install Mercurial?
- How to set up Mercurial?
- How do you create a new project/repository?
- How do you configure it to ignore files?
使用代码
- How do you get the latest code?
- How do you check out code?
- How do you commit changes?
- How do you see what's uncommitted, or the status of your current codebase?
- How do you remove files from the repository?
- 如何销毁不需要的提交?
- How do you compare two revisions of a file, or your current file and a previous revision?
- How do you see the history of revisions to a file or repository?
- 您如何处理二进制文件(例如,visio 文档或编译器环境)?
- 如何合并“同时”更改的文件?
- How do you revert a Changeset?
- How do you go back to a previous version of the code?
- How do you extract a patch from a specific changeset?
- 如何在不使用 Mercurial 命令的情况下记录重命名或删除文件?
标记、分支、发布、基线
- How do you 'mark' 'tag' or 'release' a particular set of revisions for a particular set of files so you can always pull that one later?
- 如何拉取特定的“发布”?
- How do you branch?
- How do you merge branches?
- How do you merge parts of one branch into another branch?
其他
- Good GUI/IDE plugin for Mercurial? Advantages/disadvantages?
- 初学者应该知道的任何其他常见任务?
- How do I interface with Subversion?
其他 Mercurial 参考
【问题讨论】: