Created
April 14, 2020 06:55
-
-
Save Alexzanderk/c6fb4cdfd73c961b6d447715dd449688 to your computer and use it in GitHub Desktop.
Get all remote branches to local
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 branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master `; do | |
| git branch --track ${branch#remotes/origin/} $branch | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment