Here is an alias for hgrc
If you are on a Posix system, add this alias to your hgrc file:
# Example invocation:
And call it like this if you want to remotely delete "default / bad-branch":
# hg gitremotedelete <name of remote>/<branch to delete> hg gitremotedelete default/bad-branch
Manual execution
If you want to know what does the above: here is how we will do the same as the interactive session. Hope this can be translated to Windows.
We want to remove the Git branch on some remote computer. Find out the URL of the remote default ; if you need some other remote, change as necessary.
hg paths default # git+ssh:
What is a repo root?
hg root
Go to the Git directory under the repo root
cd /home/You/current_repo/.hg/git
Speak the magic words that Git gets to remove the remote branch by passing the remote repo url in the style that Git expects
git push git@example.com:some_user/some_repo.git :branch-to-delete
Also remove the remote tracking branch because Git does not automatically delete it. Hg-Git generates remote anchor tags on the fly from remote tracking links, so removing a remote tracking branch in Git is necessary and sufficient to no longer see the tag in Mercurial.
git branch -rd default/branch-to-delete
Finally, remove the local Git branch (local link):
git branch -d $branch
Esteis
source share