如何将私有Bitbucket存储库迁移到公共Github存储库

dan*_*per 4 github bitbucket

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

dan*_*per 7

  1. 使用外部克隆URL对存储库进行"裸"克隆(即数据的完整副本,但没有用于编辑文件的工作目录).这可确保所有旧数据的清晰,全新导出.
  2. 使用"镜像"选项将本地克隆的存储库推送到GitHub,这样可确保将所有引用(即分支,标记等)复制到导入的存储库.

以下是所有命令:

git clone --bare https://bitbucket.com/user/repo.git
cd repo.git
git push --mirror https://github.com/ghuser/repo.git
Run Code Online (Sandbox Code Playgroud)