Skip to content

Instantly share code, notes, and snippets.

@oranj
Created June 2, 2015 16:21
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 oranj/6917817563e5d57c9d4e to your computer and use it in GitHub Desktop.
Save oranj/6917817563e5d57c9d4e to your computer and use it in GitHub Desktop.
gitclean
#! /bin/bash
echo "Before cleanup:";
git branch;
echo "----";
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d;
echo "----";
echo "After cleanup:";
git branch;
@oranj
Copy link
Author

oranj commented Jun 2, 2015

Stolen from Tyler Kearns here

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