Git admin - cleaning up remote branches
When using git branches and pushing them to a remote you inevitably need to do some tidy up.
Deleting a local branch:
git branch -d branch_to_delete
Deleting a local branch that is not in the current history:
git branch -D branch_to_delete
Deleting a branch in the remote (origin) repo:
git push origin :branch_to_delete
Deleting the local copy of a remote branch:
git branch -d -r origin/branch_to_delete
Cleaning up your local copies of remote branches (matching the branches on the remote):
git fetch -p
(Source: wiki.sourcemage.org)