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
| # Credit http://stackoverflow.com/a/2514279 | |
| # List old branches | |
| for branch in `git branch -r | grep -v HEAD | grep -v "origin/master"`; | |
| do | |
| echo -e `git show --format="%ci %cr %ae %an" $branch | head -n 1` \\t$branch; | |
| done | sort -r | |
| # Delete local remotes/origin/... branches not on the remote | |
| git remote prune origin |