HIT*_*irl 1 git repository code-duplication
Git新手问题。我设置了两个组织,并且希望将存储库从一个组织复制/复制到另一个组织。需要采取哪些步骤?
小智 5
考虑testRepo是某个组织或用户下的存储库名称sampleOrg
所以你的 git url 将是https://github.rackspace.com/sampleOrg/testRepo
步骤1.在其他组织下创建具有相同名称的存储库,您需要在其中复制。
eg: `https://github.rackspace.com/sampleOrgMirror/testRepo`
Run Code Online (Sandbox Code Playgroud)
步骤2.运行:git clone --bare https://github.com/sampleOrg/testRepo.git
第 3 步:运行:cd testRepo.git
第 4 步:运行:git push --mirror https://github.com/sampleOrgMirror/testRepo.git
第 5 步:运行:cd ..
第 6 步:运行:rm -rf testRepo.git
现在您的代码可以在https://github.com/sampleOrgMirror/testRepo.git
您可以点击链接了解更多详细信息 https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/duplicating-a-repository
| 归档时间: |
|
| 查看次数: |
9028 次 |
| 最近记录: |