Skip to content

Instantly share code, notes, and snippets.

@suryakencana007
Forked from grimzy/git-pull-all
Created February 1, 2018 07:06
Show Gist options
  • Save suryakencana007/ec4f2cee6a3a3c4895b605260e17bf70 to your computer and use it in GitHub Desktop.
Save suryakencana007/ec4f2cee6a3a3c4895b605260e17bf70 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