Reputation: 2158
I want to have local branch in my cloned repository that will not exist in main repository. To do this I create branch named "new_branch", develop and commit to it. Sometimes I make commites to default branch and after that I make "push -b default" that the branch "new_branch" not appeared in main repository. After the development in "new_branch" finished I make merge to default branch and I want to make push for default branch "push -b default". I get message "abort: push creates new remote branches: new_branch! (use 'hg push --new-branch' to create new remote branches)". Can I have a only local branch in Mercurial?
Upvotes: 2
Views: 1467
Reputation: 62228
Once you create a branch using hg branch
, it is a permanent part of the changeset. It will always require you to push using the --new-branch
option. You cannot strip the branch name without modifying history.
If you want give a local name to a branch that does not get propagated when you push, then you should use hg bookmark
instead.
Upvotes: 0
Reputation: 7755
Phases can be used for this in modern Mercurial:
# hg phase --secret -r 7::10
Will mark changes 7 through 10 as secret, as so they won't be pushed, pulled, cloned, etc.
Upvotes: 0
Reputation: 97375
You can try:
--mq
option)Upvotes: 3