将包含所有分支和完整历史记录的 Git 存储库从 Google Cloud 移动到 AWS 云的最佳方法是什么?是否有我必须使用的脚本或命令列表?
答案 0 :(得分:0)
我认为您正在寻找的是 --mirror
和 git clone
的 git push
选项:
# clone repository from old location
git clone --mirror git clone old-url/my-repo
cd my-repo
# point the url for `origin` at your new repository
git remote set-url origin new-url/my-repo
# push all references to the new repository
git push --mirror origin
将 old-url
和 new-url
替换为您的 Google Cloud 和 AWS Cloud 存储库的相应存储库 URL。