Skip to content

Instantly share code, notes, and snippets.

@clintmod
Created August 8, 2014 05:43
git checkout every remote branch (so you can push them all to a different repo) using git push newRepo --all
for branch in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin | grep -v HEAD | sed 's:^origin/::'); do git checkout "$branch"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment