Skip to content

Instantly share code, notes, and snippets.

@ceelsoin
Last active February 1, 2019 12:37
Show Gist options
  • Save ceelsoin/c4cf8b111e296a9e6d4b0d15af1539b9 to your computer and use it in GitHub Desktop.
Save ceelsoin/c4cf8b111e296a9e6d4b0d15af1539b9 to your computer and use it in GitHub Desktop.
Export commit log to multiple projects
#!/bin/bash
repos=($(ls -d */))
for index in "${!repos[@]}"
do
cd "${repos[$index]}"
if [ -e ".git" ]
then
repoName=${repos[$index]//\//""}
echo ${repoName}
git log master --after="2018-10-1" --before="2018-12-31" --date=iso --pretty=format:'%h;%an;%ad;%s,' --no-merges > ../../logs_csv/"${repoName}".csv
fi
cd ..
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment