Migrating from Self-Hosted Git to GitHub

Copying a local repo into a GitHub repo:

git push --mirror git@github.com:USERNAME/REPOSITORY.git

Switch the remote URL for your local repo to point at GitHub repo:

git remote set-url origin git@github.com:USERNAME/REPOSITORY.git

Source: http://adamstrawson.com/posts/Switching-to-GitHub/

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>