Delete a local branch
Deleting a local branch is the simplest of the two.
git branch -d branchToDelete
If you have unstaged changes, you need to force the removal with a capital D
instead.
git branch -D branchToDelete
Delete a remote branch
Deleting a branch remotely actually requires a push
, but it’s quite simple as well.
git push origin --delete branchToDelete