分支私有仓库,复制并制作公共仓库

  • 本文关键字:分支 复制 github
  • 更新时间 :
  • 英文 :


我已经分叉了一个私有仓库,我可以在我的 github 上复制并创建一个新的公共仓库吗?

Mary,私人分叉不能公开。不过,您可以轻松地复制到新的存储库。

git clone --bare https://github.com/otherusername/private-repo.git
cd private-repo.git
git push --mirror https://github.com/yourname/public-repo.git
cd ..
rm -rf private-repo.git
git clone https://github.com/yourname/public-repo.git