From 6c47ac5cbc8124631d5c0678852eb3a1f3e1e9eb Mon Sep 17 00:00:00 2001 From: tekkub Date: Thu, 16 Dec 2010 16:24:13 -0700 Subject: Clean up the move repo guide a bit --- _posts/2009-06-25-moving-a-repo.markdown | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to '_posts') diff --git a/_posts/2009-06-25-moving-a-repo.markdown b/_posts/2009-06-25-moving-a-repo.markdown index 67eae73..d87ac0d 100644 --- a/_posts/2009-06-25-moving-a-repo.markdown +++ b/_posts/2009-06-25-moving-a-repo.markdown @@ -7,33 +7,29 @@ categories: repos This guide details the process of moving a repo to another account. -Organizations -------------- +Direct move +----------- -If you wish to move a repo from a user to an organization, please [contact support](http://support.github.com/) with details. +If you wish to move a repo between users or organizations, please [contact support](http://support.github.com/) with details. Make sure that there is not a repo with the same name on the destination account, and that the destination account has unused private repos available if the repo being moved is private. -Forking and Rooting -------------------- +Existing forks +-------------- -The simplest route to transfer ownership is to make a fork and change the root. To do this: +If a fork of the repo you wish to move already exists on the target account, you can [contact support](http://support.github.com/) to have the roots switched. Note that deleting the root repo will either delete all forks if the repo is private, or automatically pick a new root if the repo is public. You cannot pick which repo will become the root, so please contact support if you want a specific repo to become the new root. -* Add the new owner as a collab if the repo is private -* Fork the repo on the new owner's account -* Contact [support](support@github.com) from the email of the current owner's account and request the new owner's fork be made the root. - -Note that if the repo is private the new owner will need a paid plan to support the repo. Issues, wikis, pages, commits comments and non-repo downloads will not be transferred to the new root. Make sure you do not delete your old repo if you have any of these you wish to keep. +Note that if the repo is private the new owner will need a paid plan to support the repo. Issues, wikis, pages, commits comments and non-repo downloads **will not** be transferred to the new root. Make sure you do not delete your old repo if you have any of these you wish to keep. Manual clone and push --------------------- -This method is a bit more involved, but will create an exact mirror of the repo into the new repo. Forks, collaborators and non-repo data will **not** be transferred to the new repo, it will be a fresh mirror. +If you have a repo on an external server that you wish to move to GitHub, you can move it with a special clone and push. This method will create an exact mirror of the repo into the new repo. First, create a new repo on the target account. Next, create a mirror that includes all branches and tags. To do this you need to do a bare-clone followed by a mirror-push:
-git clone --bare git@github.com:myaccount/my-old-repo.git
+git clone --bare url/for/my-old-repo.git
 cd my-old-repo
-git push --mirror git@github.com:mycompany/our-new-repo.git
+git push --mirror git@github.com:mycompany/my-new-repo.git
 cd ..
 rm -rf my-old-repo
 
-- cgit v1.3.1