From 12c87f192d537920c2193611535903b731e4cb02 Mon Sep 17 00:00:00 2001 From: tekkub Date: Thu, 25 Jun 2009 14:10:56 -0600 Subject: Add moving a repo guide --- _posts/2009-06-25-moving-a-repo.textile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 _posts/2009-06-25-moving-a-repo.textile diff --git a/_posts/2009-06-25-moving-a-repo.textile b/_posts/2009-06-25-moving-a-repo.textile new file mode 100644 index 0000000..33bdd84 --- /dev/null +++ b/_posts/2009-06-25-moving-a-repo.textile @@ -0,0 +1,32 @@ +--- +layout: guide +title: Moving a repo +subtitle: This guide details the process of moving a repo to another account and transferring the network of forked repos. +description: How to move a repo from one account to another +categories: repos +--- + +h3. 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. + +h3. 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: + +
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
+ +h3. 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!* + +h3. 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 -- cgit v1.3.1