Skip to content

Instantly share code, notes, and snippets.

View pzinovkin's full-sized avatar
🎱

Pavel Zinovkin pzinovkin

🎱
View GitHub Profile
# 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