Skip to content

Instantly share code, notes, and snippets.

@tiagodevweb
Last active January 26, 2023 11:45
Show Gist options
  • Select an option

  • Save tiagodevweb/276408ccdecad963bf523f80dc378325 to your computer and use it in GitHub Desktop.

Select an option

Save tiagodevweb/276408ccdecad963bf523f80dc378325 to your computer and use it in GitHub Desktop.
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 {remote?}
git {pull,push} --all {remote?}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment