Deleting Branches—Git

If you no longer need a branch, you can delete it. This also deletes any commits on that branch.

You can delete any branch except the current branch. If you need to delete the current branch, you will have to switch to a different branch first. See Switching Branches—Git.