This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir temp | |
cd temp | |
git clone git@yourDomain.unfuddle.com:yourDomain/yourRepoName.git | |
cd yourRepoName/ | |
git remote rm origin | |
git remote add origin https://yourUsername@bitbucket.org/yourUsername/yourNewRepoName.git | |
git remote show origin | |
git push origin master | |
cd ../.. | |
rm -rf temp | |
git clone git@bitbucket.org:yourUsername/yourNewRepoName.git |
Thanks brutha, that helped a lot
ReplyDeleteGlad to be of service :)
ReplyDeleteThis didn't push all my branches. How do I do that?
ReplyDeleteAfter you clone your old repository you have to checkout all the branches:
Deletegit branch -r # displays all remote branches
git checkout -t origin/mybranch # checks out and tracks a given remote branch, do this for all of them
... continue as stated above ...
git push origin mybranch # in the end push all the branches to the remote