Last active
October 16, 2022 02:27
-
-
Save RandalSchwartz/ce3396f9c3376dbfe3afd316fb5c09d4 to your computer and use it in GitHub Desktop.
update a series of git repos in a subdirectory, then see which one has the most recent commits
This file contains 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/zsh | |
for i in */.git; do ( | |
echo "====== $i:h ======" | |
cd $i:h && | |
git pull | |
); done | |
for i in */.git; do | |
( | |
cd $i:h && | |
git log -1 --all --date=iso-local --format='%ad' | | |
read x | |
echo "$x $i:h" | |
) | |
done | sort -r |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment