mercurial - 在 Mercurial 中分支

标签 mercurial branch dvcs

我已经开始使用 Mercurial 来满足我(我们的)版本控制需求。我现在已经到了需要创建一个功能分支的地步。然而,现在我已经开始研究它——并且我尝试插入我的更改,我不断收到有关新远程头的警告。这很愚蠢,我知道会有新的远程头,这毕竟是分支吗?

我应该如何在没有这个问题的情况下创建分支并推送它们,而不使用强制推送,因为这肯定不是正确的方法,对吧?

我想过使用单独的存储库,但这感觉很愚蠢,尤其是对于功能分支。

欢迎任何帮助!

最佳答案

迄今为止,最好的指南是 Steve Losh 的“A Guide to Branching in Mercurial”。

Mercurial 总是提示在 Remote 上创建新的头。您必须使用 --force--new-branch创建新头时。

使用 TortoiseHg 时,同样可以通过 Synchronize 完成。工作台的 View 。点击Options然后选择 Allow push of a new branchForce push or pull选项,根据需要。

TortoiseHg v2.x

之所以这样做,是因为 Mercurial 开发人员希望有意识地决定在 Remote 上创建一个新的头部。他们的观点是,典型的工作流应该在推送之前合并更改。

关于mercurial - 在 Mercurial 中分支,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4317857/

相关文章:

git - 哪个分布式源代码控制系统与 Windows 和 Visual Studio 的集成最好?

mercurial - Mercurial 如何处理拆分的文件?

version-control - Mercurial 随机添加 60 多个 merge

Git:有没有一种从一个分支 merge 到多个分支比串行执行每个分支更快的方法?

mercurial - 为什么 Mercurial 有时允许与祖先 merge ?

git - 如何确保我的 git repo 代码是安全的?

Google 代码值错误上的 Mercurial 推送错误

mercurial - hg将本地存储库重置为远程存储库的状态

svn - 颠覆: Can trunk be reset to previous revision after branching/tagging?

templates - GitHub 拉取请求模板 : get current branch name