Skip to content

Instantly share code, notes, and snippets.

@grimzy
Created September 15, 2017 02:15
Show Gist options
  • Select an option

  • Save grimzy/a1d3aae40412634df29cf86bb74a6f72 to your computer and use it in GitHub Desktop.

Select an option

Save grimzy/a1d3aae40412634df29cf86bb74a6f72 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
@habibx792
Copy link

hi i am beginner in coding i want to make a project my remote has three branche but on local i have only on branch can any body know how track or i can locally have all these three bracnhes https://github.com/habibx792/BankMangemetSystem
Screenshot 2026-01-20 180410

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment