Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Copy all remotes git branch for origin and push to origin2
git branch -a | grep remotes/origin | grep -vw 'HEAD' | cut -d'/' -f3 | xargs -I {} sh -c 'git co {} && git push -u origin2 {}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.