Skip to content

Instantly share code, notes, and snippets.

@nrlozdemir
Created March 27, 2020 11:01
Show Gist options
  • Save nrlozdemir/28f913bab1c8d016d181bc475bdc7a47 to your computer and use it in GitHub Desktop.
Save nrlozdemir/28f913bab1c8d016d181bc475bdc7a47 to your computer and use it in GitHub Desktop.
Fetch all branches
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment