Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top