Created
April 23, 2012 14:03
-
-
Save dannyfallon/2471083 to your computer and use it in GitHub Desktop.
Remote branch fetch & track
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
Blatantly stolen from stack overflow, copy the below command into a terminal and run it | |
remote=origin ; for brname in `git branch -r | grep $remote | grep -v master | grep -v HEAD | awk '{gsub(/[^\/]+\//,"",$1); print $1}'`; do git branch --set-upstream $brname $remote/$brname ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment