Created
January 18, 2016 10:02
-
-
Save Ketouem/8e839fc1ac16af44820a to your computer and use it in GitHub Desktop.
Set bluntly a bunch of git repos contained in a folder up to date with the master branch
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
for file in */ ; do | |
if [[ -d "$file" && ! -L "$file" ]]; then | |
echo "$file is a directory, launching git commands."; | |
cd $file && git checkout master && git reset HEAD --hard && git pull --rebase --prune; | |
cd ..; | |
fi; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment