Created
July 16, 2016 21:56
-
-
Save micahwalter/45c0202032c8c0d9146972862661b0c8 to your computer and use it in GitHub Desktop.
one-line git command to pull all branches
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
git branch -a | grep -v HEAD | perl -ne 'chomp($_); s|^\*?\s*||; if (m|(.+)/(.+)| && not $d{$2}) {print qq(git branch --track $2 $1/$2\n)} else {$d{$_}=1}' | csh -xfs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment