Last active
June 27, 2017 09:19
-
-
Save pysysops/ac02081962efc79029c90a313e8cd54c to your computer and use it in GitHub Desktop.
Pull all remote git repos locally
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 | |
for b in $(git branch -r | grep -v HEAD | cut -f 2 -d'/') | |
do | |
git checkout $b && git pull origin $b $@ | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Put this script somewhere on your
PATH
and run withgit pull-all
append anygit pull
arguments like:git pull-all --rebase