【问题标题】:How to push to a different branch with hg-git?如何使用 hg-git 推送到不同的分支?
【发布时间】:2013-12-14 12:02:14
【问题描述】:

当我处理我的 Git 存储库克隆时,远程内容发生了变化:

$ hg push
...
abort: refs/heads/master changed on the server, please pull and merge
 before pushing

我想将提交从本地副本推送到不同的远程分支,而不是合并。我该怎么做?

【问题讨论】:

    标签: hg-git


    【解决方案1】:

    自己找到的。

    hg bookmark fixes             # copy content to new git branch 'fixes'
    hg bookmark --delete master   # remove old master branch, to avoid abort error
    hg push
    

    将提交移动到 git 本身的不同分支更容易。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-06-20
      • 2018-02-12
      • 1970-01-01
      • 1970-01-01
      • 2011-02-27
      • 2010-11-07
      • 2011-05-02
      相关资源
      最近更新 更多