Skip to content

Instantly share code, notes, and snippets.

@foca
Created July 21, 2011 20:30
Show Gist options
  • Save foca/1098132 to your computer and use it in GitHub Desktop.
Save foca/1098132 to your computer and use it in GitHub Desktop.
List branches that are still in the upstream repositories
$ git config alias.stale
!for sha in $(git branch -rv --merged | grep -v origin/HEAD | awk '{print $2}'); do printf "%-40s %s" "$(git name-rev --name-only $sha)" "$(git log -1 --format="%h %an" $sha | cat)"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment