Created
November 29, 2020 08:04
-
-
Save avshatalov48/f9ba2cba93ec1c274ca7fa4627287c97 to your computer and use it in GitHub Desktop.
Track all remote git branches as local 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
# Track all remote git branches as local branches | |
# | |
# !!! After git 1.9.1 | |
# | |
# https://stackoverflow.com/a/379842 | |
# | |
# Run: | |
# $ chmod 777 branches.sh | |
# $ ./branches.sh | |
# | |
for i in `git branch -a | grep remote | grep -v HEAD | grep -v master`; do git branch --track ${i#remotes/origin/} $i; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment