Skip to content

Instantly share code, notes, and snippets.

@dweomer
Created October 20, 2015 23:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dweomer/711486a231e7439f0741 to your computer and use it in GitHub Desktop.
Save dweomer/711486a231e7439f0741 to your computer and use it in GitHub Desktop.
#/bin/bash
STALE_SINCE=${STALE_SINCE:-"3 months"}
git for-each-ref --sort=-committerdate refs/remotes/origin --format='%(refname:short) %(committerdate:relative)' | \
while read REF RELDATE
do
if [ -z "$(git log -1 --since="${STALE_SINCE}" -s ${REF})" ]; then
echo $(echo ${REF} | grep --color=tty "${REF}"): ${RELDATE}
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment