diff options
Diffstat (limited to '_posts')
| -rw-r--r-- | _posts/2009-06-25-moving-a-repo.markdown | 34 | ||||
| -rw-r--r-- | _posts/2009-06-25-moving-a-repo.textile | 33 |
2 files changed, 34 insertions, 33 deletions
diff --git a/_posts/2009-06-25-moving-a-repo.markdown b/_posts/2009-06-25-moving-a-repo.markdown new file mode 100644 index 0000000..94ccd6c --- /dev/null +++ b/_posts/2009-06-25-moving-a-repo.markdown @@ -0,0 +1,34 @@ +--- +layout: default +title: Moving a repo +description: How to move a repo from one account to another +categories: repos +--- + +This guide details the process of moving a repo to another account. There are two ways to do this: manually cloning and pushing to a new repo, or forking the repo and changing the network's root. + +Forking and Rooting +------------------- + +The simplest route to transfer ownership is to make a fork and change the root. To do this: + +* 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. + +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. + +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: + +<pre class="terminal"> +git clone --bare git@github.com:myaccount/my-old-repo.git +cd my-old-repo +git push --mirror git@github.com:mycompany/our-new-repo.git +cd .. +rm -rf my-old-repo +</pre> diff --git a/_posts/2009-06-25-moving-a-repo.textile b/_posts/2009-06-25-moving-a-repo.textile deleted file mode 100644 index 060a054..0000000 --- a/_posts/2009-06-25-moving-a-repo.textile +++ /dev/null @@ -1,33 +0,0 @@ ---- -layout: default -title: Moving a repo -description: How to move a repo from one account to another -categories: repos ---- - -This guide details the process of moving a repo to another account and transferring the network of forked repos. - -h2. Creating a new repo - -The first step to moving a repo is to create a new repo on the target account. If your current repo is public, you can simply fork the repo while logged into the target account. If the repo is private, you will need to create a new private repo on the target account to push to. - -h2. Creating a mirror - -p(. _If you forked this step is not necessary, but you may still do it for good measure._ - -To create a complete mirror that includes all branches and tags, you need to do a bare-clone followed by a mirror-push: - -<pre class="terminal">git clone --bare git@github.com:myaccount/my-old-repo.git -cd my-old-repo -git push --mirror git@github.com:mycompany/our-new-repo.git -cd .. -rm -rf my-old-repo</pre> - -h2. Reparenting forks - -If your original repo has forks that you wish to reparent to the new repo, please "file a support ticket":http://support.github.com/. -*Do not delete the original repo until the reparenting is complete!* - -h2. Collaborators - -If your original repo had collaborators, they will not be copied. You will need to add each user as a collaborator on the new repo.
\ No newline at end of file |
