Skip to content

Instantly share code, notes, and snippets.

@Sher-Chowdhury
Last active February 6, 2019 20:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sher-Chowdhury/ab6c4bfe19ad165a0a304f01cc1c8759 to your computer and use it in GitHub Desktop.
Save Sher-Chowdhury/ab6c4bfe19ad165a0a304f01cc1c8759 to your computer and use it in GitHub Desktop.
push all branches to a new empty github/bitbucket repo
git remote set-url origin git@github.com:xxxx/xxxx.git
for branch in $(git branch -r | grep -v HEAD | cut -d'/' -f2) ; do git checkout $branch ; git push --set-upstream origin $branch ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment