Apr 30, 2018

Delete git branch

We can delete a branch by calling the branch command and passing in the -d option, followed by the branch name.
$ git branch -d <branchname>


You can delete a remote branch using
$ git push <remote_name> --delete <branch_name>
Note that in most cases the remote name is origin.