Last active
August 9, 2017 16:02
-
-
Save mushinlogit/d3bb4fd7006542a677b101e4e16d73d8 to your computer and use it in GitHub Desktop.
gitLatest.sh
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/bash | |
# from root directory, traverse child directories and git up, then list their current branch | |
projs=$(find $PWD -maxdepth 1 -type d) | |
for proj in $projs | |
do | |
cd $proj | |
git fetch --all -p | |
git pull | |
done | |
echo "Current Branches" | |
for proj in $projs | |
do | |
cd $proj | |
echo "${proj}" | |
git branch | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment