Git Cheatsheet Fetch all origin branches as local branches git branch -r | grep -v '\->' | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" | while read remote; do git branch --track "${remote#origin/}" "$remote"; done git pull origin --all Push all branches to all remotes: git remote | xargs -L1 git push --all