将git回购复制到另一个组织中
Git新手问题。我设置了两个组织,希望将存储库从一个组织复制/复制到另一个组织。将git回购复制到另一个组织中,git,repository,code-duplication,Git,Repository,Code Duplication,Git新手问题。我设置了两个组织,希望将存储库从一个组织复制/复制到另一个组织。 具体步骤是什么?您只需通过克隆库即可 您可以通过以下方式实现这一点 考虑一下testRepo是某个组织或用户下的回购名称sampleOrg 因此,您的git url将是https://github.rackspace.com/sampleOrg/testRepo 第一步。在需要复制的其他组织下创建同名回购 eg: `https://github.rackspace.com/sampleOrgMirror/te
具体步骤是什么?您只需通过克隆库即可 您可以通过以下方式实现这一点
考虑一下
testRepo
是某个组织或用户下的回购名称sampleOrg
因此,您的git url将是https://github.rackspace.com/sampleOrg/testRepo
第一步。在需要复制的其他组织下创建同名回购
eg: `https://github.rackspace.com/sampleOrgMirror/testRepo`
第二步。运行:git克隆--barehttps://github.com/sampleOrg/testRepo.git
步骤3:运行:cdtestrepo.git
步骤4:运行:gitpush--mirrorhttps://github.com/sampleOrgMirror/testRepo.git
步骤5:运行:cd..
步骤6:运行:rm-rf old repository.git
现在您的代码在https://github.com/sampleOrgMirror/testRepo.git
您可以通过链接了解更多详细信息
这是一次性复制操作,还是两个存储库应该持续更新?我真的认为第一步是稍微更新一点。
git copy https://github.com/org1/repo.git https://github.com/org2/repo.git
eg: `https://github.rackspace.com/sampleOrgMirror/testRepo`