Created
August 14, 2012 20:46
-
-
Save loganlinn/3352814 to your computer and use it in GitHub Desktop.
Git branch cleanup - older than 1 year, not matching 'release' or 'master'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git branch -r --merged master | sed 's/ *origin\///' | grep -v -E '(release|master$)' | xargs -I_ git log -1 --format='_ %ct' origin/_ | awk '{ if ($2 < '$(date -v-1y +%s)') print $1 }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment