When using Mercurial, often I'll do hg push
and I'll get this error message:
(use 'hg push --new-branch' to create new remote branches)
Which is fine, I understand why I get the message. But I always want to push any new branches so I was wondering if there was any way to force Mercurial to remember to always push new branches without me having to do:
hg push
...
(use 'hg push --new-branch' to create new remote branches)
---
hg push --new-branch
There was a way of setting default options for commands on mercurial using the [default]
section on .hgrc
, but it is now deprecated.
The recommended way of doing that is using aliases. On your .hgrc
, put:
[alias]
pushb = push --new-branch
After that use hg pushb
to push creating new branches.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With