Search code examples
mercurialbranch

Create a branch when "a branch of the same name already exists"?


I already read topics like How to correctly close a feature branch in Mercurial?

But I want remove branches reference.

Example

hg branch my-branch
hg commit -m "commit" --close-branch
hg branches -c

hg branches -c displays my-branch in the list. And I can't create a new branch named my-branch.

hg branch my-branch

Mercurial shows me an error :

abort: a branch of the same name already exists

Do you know how to remove branch reference definitively ?


Solution

  • hg help branch

    ...

    options:

    -f --force set branch name even if it shadows an existing branch

    ...