Skip to content

Instantly share code, notes, and snippets.

@bingalls
Created August 24, 2017 19:32
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 bingalls/a0506d6c02192e312b2d2c5742f8d4c2 to your computer and use it in GitHub Desktop.
Save bingalls/a0506d6c02192e312b2d2c5742f8d4c2 to your computer and use it in GitHub Desktop.
List stale git branches that were already merged into master
git branch -r --merged master | sed 's|origin/||' | sort -u
@cesutherland
Copy link

@bingalls nice — I do have one of these! A little more dangerous heh: git branch --merged master | grep -v "\* master" | xargs -n 1 git branch -d

@bingalls
Copy link
Author

bingalls commented Jan 9, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment