I can delete remote branches in Git using git push
. (See How do I delete a remote branch in Git?). But I can't do the equivalent using Mercurial bookmarks.
I've tried hg bookmark -d something
, but when I push to a Git repository using hg-git, it does not delete the bookmark on the remote repository.
When I try hg bookmark -d origin/something
, it complains that it doesn't exist.
To delete a bookmark from a remote server, you must have permission to push to the server. If you can push to it, then you can:
hg bookmark --delete <bookmark name>
hg push --bookmark <bookmark name>
See the "Working With Remote Repositories" section of the Mercurial BookmarksExtension wiki for further info.
NOTE: This only removes the bookmark itself. It does not remove any changesets that were associated with the bookmark. If you need to remove the changesets themselves, then you must consider other methods as noted in these related questions.
With hg-git it is not possible at the moment.
You have to install the git client, clone the repo and issue a
git push origin :oldbranch
to delete the old branch. Hopefully there will be a patch one day.
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