Created
May 8, 2023 21:29
-
-
Save awmpietro/70ae06987528ee12b5c3e93e1811f526 to your computer and use it in GitHub Desktop.
run this shell script to recreate all remote branches locally from a remote repository
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 b in `git branch -r | grep -v -- '->'`; do git branch --track ${b##origin/} $b; done | |
| git fetch --all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment