Last active
December 25, 2015 02:39
-
-
Save ross-nordstrom/6903918 to your computer and use it in GitHub Desktop.
Script to "git fetch" all repos with a given prefix
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 | |
TargetDir="*" | |
DateStamp=$(date +"%Y%m%d"); | |
for Dir in $(find $TargetDir* -maxdepth 0 -type d ); | |
do | |
FolderName=$(basename $Dir); | |
cd $FolderName | |
pwd | |
# Fetch the latest code from github | |
git fetch & | |
cd .. | |
done |
you should add a #! /bin/bash
at the top.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Might want to dump the "git fetch" output to a file instead of stdout