Sometimes you have to move your git repository to another host. In this case I want to move a privately hosted git repository to a brand spanking new github repository.
These are four easy steps to get that done:
git clone --bare email@example.com:project.git cd project.git git push --mirror firstname.lastname@example.org:ariejan/project.git cd .. && rm -rf project.git
That’s it. Don’t forget to update the
remote of your working copy accordingly:
git remote set-url origin email@example.com:ariejan/project.git
Of course, this works with any git server or service, not just Github, although Github is awesome and you should use it.
Learn more about git!
If you're seeing this message you've probably enabled some form of adblocker. I respect that.
I use this space to show recommended books on Amazon.com in relation to the post you just read. This generates a small income that allows me to buy a book every now and then.