Skip to content

Instantly share code, notes, and snippets.

@bryanburgers
Created July 16, 2013 15:41
Show Gist options
  • Save bryanburgers/6009871 to your computer and use it in GitHub Desktop.
Save bryanburgers/6009871 to your computer and use it in GitHub Desktop.
Using bash and git to get a list of all of the projects I've touched in the last quarter.
# Adapted from https://coderwall.com/p/tfx67w
function githistory {
since="2013-04-17"
author="Bryan";
directory="/d/projects"
pushd $directory > /dev/null;
find . -maxdepth 3 -name ".git" | sed "s:/\.git$::g" |
while read line;
do
pushd "$line" > /dev/null;
git log -1 --pretty=format:"%cd - $line - %s" --since="${1:-$since}" --author="${2:-$author}" --date="iso"
echo
popd > /dev/null;
done | sort;
popd > /dev/null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment