Suppose we have an application that\'s stable.
Tomorrow, someone reports a big ol\' bug that we decide to hotfix right away. So we create a branch for that hotfix off o
You can safely remove a branch with git branch -d yourbranch
. If it contains unmerged changes (ie, you would lose commits by deleting the branch), git will tell you and won't delete it.
So, deleting a merged branch is cheap and won't make you lose any history.
To delete a remote branch, use git push origin :mybranch
, assuming your remote name is origin and the remote branch you want do delete is named mybranch.