Created
November 5, 2019 11:03
-
-
Save eriadam/659f4710d64ec724b72b8f062b8c86d8 to your computer and use it in GitHub Desktop.
git log for all subfolders
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
AUTHOR=$(git config user.name) | |
DATE=$1 | |
echo "folder;date;comment" | |
for D in *; do | |
if [ -d "${D}" ]; then | |
# echo $D | |
cd $D | |
git log \ | |
--no-merges \ | |
--format="%cd" \ | |
--date=short \ | |
--no-merges \ | |
--since=$DATE \ | |
--author="$AUTHOR" \ | |
--all | sort -u -r | while read DATE ; do | |
GIT_PAGER=cat git log \ | |
--no-merges \ | |
--format="$D;%ci;%s" \ | |
--since=$DATE \ | |
--until=$NEXT \ | |
--author="$AUTHOR" \ | |
--all | |
NEXT=$DATE | |
done | |
cd .. | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage:
$ sh git.sh "2019-10-01" > october.csv