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.
To delete a remote branch, you can't use the git branch command. Instead, use the git push command with --delete flag, followed by the name of the branch you want to delete. You also need to specify the remote name ( origin in this case) after git push .
Deleting a branch REMOTELY Here's the command to delete a branch remotely: git push <remote> --delete <branch> . The branch is now deleted remotely.
Delete branches We can delete a branch by calling the branch command and passing in the -d option, followed by the branch name.
You can type y (magit-show-refs
) to go to the refs buffer, and then k (magit-branch-delete
) on any remote branch to delete it.
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
.
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