Skip to content

Instantly share code, notes, and snippets.

@ludoo0d0a
Created November 4, 2018 21:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ludoo0d0a/1f25b372648ebd988956d5c8479ce0ae to your computer and use it in GitHub Desktop.
Save ludoo0d0a/1f25b372648ebd988956d5c8479ce0ae to your computer and use it in GitHub Desktop.
Git - Fetch all remote branches in one command
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment