Created
October 21, 2016 20:54
-
-
Save mattbontrager/41f5e40471285df202ab3fbc9a4e63b5 to your computer and use it in GitHub Desktop.
Fetch and track all git 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
for remote in `git branch -r`; do git branch --track ${remote#origin/} $remote; done | |
git fetch --all | |
git pull --all | |
# credit to Wookie88 and Shadowfax @ http://stackoverflow.com/questions/10312521/how-to-fetch-all-git-branches | |
# saving this for quick reference and easy insertion. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment