Skip to content

Instantly share code, notes, and snippets.

@danielecook
Created February 13, 2020 15:10
Show Gist options
  • Save danielecook/5133e180a774602493eb529feb828f00 to your computer and use it in GitHub Desktop.
Save danielecook/5133e180a774602493eb529feb828f00 to your computer and use it in GitHub Desktop.
Git fetch all remote branches, fetch, and pull
# https://stackoverflow.com/questions/10312521/how-to-fetch-all-git-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