AWS 代码提交迁移

ULL*_*S K 4 git code-migration amazon-web-services aws-codecommit

可能是一个简单的问题,但我无法找到正确的文档来实现这一点。我有两个 aws 帐户,即个人 P 和 Office O。出于实验目的,最初我创建了 Codecommit 并附加了 8 个 GIT 项目。有 4 位用户使用 Paws 用户凭证并在过去 6 个月内访问过该凭证。有 3 个分支和 100 多个提交。现在我想将所有这些项目移动到公众号O,而不丢失提交及其分支的历史记录。我可以安全地获取主分支并创建新的存储库,但我需要所有历史记录和分支。有人可以帮我吗 ?

jar*_*man 7

建议查看 GitHub,他们建议使用 --mirror 函数“复制存储库”。我的理解是,这也适用于 AWS CodeCommit。

它用:

  • git clone --mirror:克隆每个引用(提交、标签、分支)
  • git push --mirror:推送所有内容

那会给出:

git clone --mirror https://codecommit-url/exampleuser/repository-to-mirror.git
# Make a bare mirrored clone of the repository

cd repository-to-mirror.git
git remote set-url --push origin https://codecommit-url/exampleuser/mirrored
# Set the push location to your mirror

git push --mirror
Run Code Online (Sandbox Code Playgroud)