Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Git fetch all remote branches to local machine
#!/bin/bash
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