Skip to content

Instantly share code, notes, and snippets.

@excenter
Last active June 20, 2018 20:22
Show Gist options
  • Save excenter/48076ac3d3a5cbdf738930758eead43c to your computer and use it in GitHub Desktop.
Save excenter/48076ac3d3a5cbdf738930758eead43c to your computer and use it in GitHub Desktop.
scrape (fetch and pull) every branch of the current git repo
git branch -r | grep -v '\->' | while read remote;
do git branch --track "${remote#origin/}" "$remote";
done;
git fetch --all;
git pull --all;
#fetch and pull every branch of the current git repo
@excenter
Copy link
Author

const SCRAPE = 'git branch -r | grep -v \'\\->\' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done;'+
'git fetch --all;'+
'git pull --all;';

as a javascript string

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