gpt4 book ai didi

github - 如何将私有(private) Bitbucket 存储库迁移到公共(public) Github 存储库

转载 作者:行者123 更新时间:2023-12-04 23:51:33 26 4
gpt4 key购买 nike

如何将私有(private) Bitbucket 存储库迁移到公共(public) Github 存储库?

最佳答案

  • 使用外部克隆 URL 对存储库进行“裸”克隆(即数据的完整副本,但没有用于编辑文件的工作目录)。这确保了所有旧数据的干净、新鲜的导出。
  • 使用“镜像”选项将本地克隆的存储库推送到 GitHub,这可确保将所有引用(即分支、标签等)复制到导入的存储库。

  • 以下是所有命令:
    git clone --bare https://bitbucket.com/user/repo.git
    cd repo.git
    git push --mirror https://github.com/ghuser/repo.git

    关于github - 如何将私有(private) Bitbucket 存储库迁移到公共(public) Github 存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21260627/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com