git fetch --prune
If you work on a team which makes heavy use of feature branches, you might find yourself manually deleting branches which have been removed or merged into master on the remote. This usually doesn’t happen often enough to become a serious annoyance, but there is an easy way to keep your local branches in sync. When you pull changes down from a remote try
git fetch —prune. it will prune any remote tracking branches which have been deleted.
As always, check the help files for any other useful configuration options:
git help fetch