Skip to content

Instantly share code, notes, and snippets.

@aydi-nebil
Forked from grimzy/git-pull-all
Created February 6, 2018 14:56
Show Gist options
  • Save aydi-nebil/56a0985f3a2f3be68228f36bb202c6de to your computer and use it in GitHub Desktop.
Save aydi-nebil/56a0985f3a2f3be68228f36bb202c6de 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