Created
March 12, 2025 11:42
-
-
Save spidgorny/581505e32b7a3ec67295394ebb310bc3 to your computer and use it in GitHub Desktop.
weekly-git-report.sh
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
# Usage bash weekly-git-report.sh [days=7] | |
DAYS=${1:-7} | |
FOLDERS=$(find . -maxdepth 2 -name ".git" -type d | sort) | |
# echo $FOLDERS | |
ROOT=$(pwd) | |
echo "$FOLDERS" | while read -r folder; do | |
folder=$(dirname "$folder") | |
echo "==$folder==" | |
echo "$ROOT/$folder" | |
cd "$ROOT/$folder" | |
git pull | |
git --no-pager log --after $(date -v-"$DAYS"d +%Y-%m-%d) --pretty='%C(yellow)%h %C(cyan)%cd %Cblue%aN%C(auto)%d %Creset%s' --date-order --date=iso | |
git push | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Run inside the folder where you have multiple repos