Skip to content

Instantly share code, notes, and snippets.

@pirhoo
Last active July 19, 2018 10:29
Show Gist options
  • Select an option

  • Save pirhoo/6d57b25c746bf739d2ac to your computer and use it in GitHub Desktop.

Select an option

Save pirhoo/6d57b25c746bf739d2ac to your computer and use it in GitHub Desktop.
Git commits for all projects inside the current foler
#!/bin/bash
echo "repository,timestamp,commit" > ~/activity.csv
for D in *; do
if [ -d "${D}" ]; then
cd $D
if [ -d ".git" ]; then
echo $D
HASH=`cksum <<< $D | cut -f 1 -d ' '`
git log --author="\(pirhoo\)\|\(Pirhoo\)|\(Pierre Romera\)" --format="${HASH},%ct,%H" >> ~/activity.csv
fi
cd ..
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment