Skip to content

Instantly share code, notes, and snippets.

@ardarda
Created March 4, 2024 06:52
Show Gist options
  • Save ardarda/4f71a63d94f21da9abbc9c90236e7261 to your computer and use it in GitHub Desktop.
Save ardarda/4f71a63d94f21da9abbc9c90236e7261 to your computer and use it in GitHub Desktop.
git fetch all with local companions
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 fetch --all
git pull --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment