Created
December 17, 2015 06:15
-
-
Save gandharva/f86d2ebc26e1d0675b3e to your computer and use it in GitHub Desktop.
Script to track, fetch and pull all remote branches
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 | |
| //Get all branches from remote and track them locally | |
| for remote in `git branch -r`; do git branch --track ${remote#origin/} $remote; done | |
| //Fetch all branches | |
| git fetch --all | |
| //Pull all branches | |
| git pull --all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment