Skip to content

Instantly share code, notes, and snippets.

@jamesbroadhead
Created November 4, 2020 16:43
Show Gist options
  • Save jamesbroadhead/519b6dc1629b2b83a5bfacf54695e136 to your computer and use it in GitHub Desktop.
Save jamesbroadhead/519b6dc1629b2b83a5bfacf54695e136 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
BRANCHES=$(git branch -lr | grep 'origin\/v20[0-9]*$')
echo $BRANCHES
for b in $BRANCHES ; do
fork_point="$(git merge-base "$b" master)"
commits=$(git rev-list ${fork_point}...${b} | wc -l)
echo "${b} ${commits}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment