Search code examples
mercurialtortoisehg

How to disable the 'create new branch' prompt in TortoiseHg


In TortoiseHg Workbench, if I create a new branch and then push changes, the push begins then a short time later I get a prompt along the lines of:

"This push will create a new branch in the remote repository, are you sure?"

Particularly because of the short delay while it checks with the remote repo, I often find I switch to another task and come back much later to find I still haven't pushed changes.

Is there a way to disable this prompt?


Solution

  • If you're happy that you want to create the new branch in the destination repository, then you can tell Mercurial that on the hg command line:

    hg push --new-branch
    

    If you're using TortoiseHg, then you can do it from the thg sync window... there is an options button, which has a checkbox to allow the pushing of a new branch. Or there is on my current version, at least.