Pushing to remote repository after merge “creates new remote heads” - is that bad?

后端 未结 2 451
长发绾君心
长发绾君心 2021-02-05 13:22
  1. I initialized a Mercurial project on Machine A, committed my changes and uploaded them to a remote

2条回答
  •  孤城傲影
    2021-02-05 13:30

    You ran hg up --clean. That means you undid the merge, which means you still need to merge. You have an unresolved file when you merge. Re-read your error message:

    5 files updated, 1 files merged, 0 files removed, 1 files unresolved
    use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
    

    You need to resolve the merge conflict and then complete the merge with hg resolve. Then you will have successfully merged your two heads.

    And to answer your question: no, it's not bad to have two remote heads. It just means you need to merge them (preferably ASAP) before you push anything else to the remote server.

    So to fix, just run hg merge, resolve the one conflict, then run hg resolve.

提交回复
热议问题