Pergunta

While I was working on my Git repository clone, the remote content changed:

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

Instead of merging, I want to push commits from my local copy to different remote branch. How do I do this?

Foi útil?

Solução

Found it myself.

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

It is way easier that moving commits to a different branch in git itself.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top