Search code examples
gitemacsmagit

How to delete a remote branch using magit in emacs


what is the magit key sequence which is the equivalent of

git push origin :branch-to-be-deleted

that will cause the branch to be dropped from the remote repo.


Solution

  • The built in branch delete feature of magit (magit-status, b k; or directly call the function magit-branch-delete) will delete remote branches in addition to local branches. Instead of specifying my-branch as the branch to delete, make sure to specify my-remote/my-branch.