I want to delete a remote branch. How can I do git push origin --delete my-branch
in magit, to delete a remote branch?
In Magit the command for deleting a remote branch is the same as for deleting a local branch, and its key binding is b k.
So to delete my-branch
on origin
you would type b k origin/my-branch
RET.
-
b k
only removes the local one. The pushed remote branch still exists on Github – Student Nov 29 '20 at 12:39 -
b k
first tries to delete the remote branch usinggit push origin --delete my-branch
and if and only if that fails (e.g. because you don't have write permissions), then it deletes the respective local ref only. – tarsius Nov 29 '20 at 17:05 -
1@Student Errr... Just so you know, tarsius is the chief maintainer of magit. :-) – TerryTsao Nov 30 '20 at 3:03