How to push to a different branch with hg-git?

1.3k Views Asked by At

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?

1

There are 1 best solutions below

0
On BEST ANSWER

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.