将Git 项目迁移到另一个仓库
创建旧仓库的裸克隆
git clone --bare https://github.com/exampleuser/old-repository.git
迁移到新仓库
cd old-repository.git
git push --mirror https://github.com/exampleuser/new-repository.git
这样的话,项目就已经迁移到新仓库了。
注意,我们不需要手动新建一个空的新仓库,当我们执行上述命令之后,新仓库就已经自动创建好了。
初次上传代码到git时
git init
git add .
git commit -m '第一次提交'
git push
引用链接
[1]https://www.cnblogs.com/wml-it/p/15591642.html
[2]https://blog.csdn.net/weixin_36995000/article/details/126352058