Skip to content

Instantly share code, notes, and snippets.

@s7anley
Last active December 20, 2015 02:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save s7anley/6060458 to your computer and use it in GitHub Desktop.
Save s7anley/6060458 to your computer and use it in GitHub Desktop.
Delete local already merged branches and update the local database of remote branches.
# Delete all branches already merged to current branch
git checkout master; git branch --merged | grep -v "\*" | xargs -n 1 git branch -d
# Sync local database of remote branchces
git fetch -p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment