Skip to content

Instantly share code, notes, and snippets.

@pysysops
Last active June 27, 2017 09:19
Show Gist options
  • Save pysysops/ac02081962efc79029c90a313e8cd54c to your computer and use it in GitHub Desktop.
Save pysysops/ac02081962efc79029c90a313e8cd54c to your computer and use it in GitHub Desktop.
Pull all remote git repos locally
#!/bin/bash
for b in $(git branch -r | grep -v HEAD | cut -f 2 -d'/')
do
git checkout $b && git pull origin $b $@
done
@pysysops
Copy link
Author

pysysops commented Jun 27, 2017

Put this script somewhere on your PATH and run with git pull-all append any git pull arguments like: git pull-all --rebase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment