Skip to content

Instantly share code, notes, and snippets.

@Splat
Created September 22, 2016 23:49
Show Gist options
  • Save Splat/e97e1da0b5b368bb06d131b52f46bf70 to your computer and use it in GitHub Desktop.
Save Splat/e97e1da0b5b368bb06d131b52f46bf70 to your computer and use it in GitHub Desktop.
find old and dead branches within a Git repo for potential cleanup
for k in $(git branch -a --merged|grep -v "\->"|sed s/^..//);do echo -e $(git log -1 --pretty=format:"%Cgreen%ci %Cred%cr%Creset" "$k")\\t"$k";done|sort|more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment