Naman Arora

How to delete a remote branch in git ?

Pushlished on 13 Nov 2022

git

Deleting remote branches in Git

To delete a remote branch, we do not use the “git branch” command - but instead “git push” with the “—delete” flag:

$ git push origin --delete feature

Deleting remote branches on Github

To delete a remote branch on github, first open your github repository

github repository

then click on master branch and then view all branches

github branches

then click the trash icon to delete the branch

github delete branch