Skip to content

Instantly share code, notes, and snippets.

@skounis
Last active May 9, 2020 11:22
Show Gist options
  • Save skounis/f900870eabc3fb556d07be92713cb72a to your computer and use it in GitHub Desktop.
Save skounis/f900870eabc3fb556d07be92713cb72a to your computer and use it in GitHub Desktop.
Git prune local branches
git fetch origin --prune
git checkout master
git branch -vv | grep ': 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