Skip to content

Instantly share code, notes, and snippets.

@hansschuijff
Forked from grimzy/git-pull-all
Created October 21, 2021 12:02
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save hansschuijff/3e7eb787b20defe87e379c83bede2f79 to your computer and use it in GitHub Desktop.
Git pull all remote branches
#!/usr/bin/env bash
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