Created
July 18, 2016 01:56
-
-
Save SyllaJay/5e51f6820d97f94c7d04802f6478f8f5 to your computer and use it in GitHub Desktop.
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 | |
# for remote in `git branch -r | grep -v /HEAD`; do git checkout --track $remote ; done | |
# for remote in `git branch -r `; do git branch --track $remote; done | |
ORIGIN=origin | |
for remote in `git branch -r | grep -v /HEAD`;do | |
local=${remote#"${ORIGIN}/"} | |
echo "git branch --track ${local} ${remote}" | |
git branch --track ${local} ${remote} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment