💡
原文英文,约100词,阅读约需1分钟。
📝
内容提要
要将GitHub仓库迁移到另一个组织并保留提交历史、分支和标签,首先在终端使用`git clone --bare https://github.com/sourcerepo.git`克隆源仓库,然后进入该文件夹,使用`git push --mirror https://github.com/targetrepo.git`将其推送到目标仓库。
🎯
关键要点
-
要迁移GitHub仓库并保留提交历史、分支和标签,首先打开终端。
-
使用命令`git clone --bare https://github.com/sourcerepo.git`克隆源仓库。
-
克隆后会创建一个本地文件夹sourcerepo.git,进入该文件夹。
-
使用命令`git push --mirror https://github.com/targetrepo.git`将更改推送到目标仓库。
➡️