Skip to content

Instantly share code, notes, and snippets.

@wriglz
Created February 11, 2020 11:00
Show Gist options
  • Save wriglz/4e7756108b97dc2958ea250b2fa511a9 to your computer and use it in GitHub Desktop.
Save wriglz/4e7756108b97dc2958ea250b2fa511a9 to your computer and use it in GitHub Desktop.
# Remove all merged, closed branches from your local machine, leaving unmerged branches in place
git remote prune origin
git branch -vv | grep 'origin/.*: gone]' | awk '{print $1}' | xargs git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment