Skip to content

Instantly share code, notes, and snippets.

@carlowens
Last active July 16, 2019 05:26
Show Gist options
  • Save carlowens/5707227 to your computer and use it in GitHub Desktop.
Save carlowens/5707227 to your computer and use it in GitHub Desktop.
track all remote branches from github
#!/bin/bash
echo "Tracking all remote branches"
for remote in `git branch -r | sed "s/origin\///g"`;
do git branch --track $remote origin/$remote;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment