git迁移仓库

git clone --bare xxx.git

git remote add remote2 xxxx.git

git push --mirror remote2

如果不能拉代码可以使用
git pull origin master --allow-unrelated-histories

[参考]
如何迁移一个Git仓库 - 知乎
git push all branches from one remote to another remote
What’s the difference between git clone –mirror and git clone –bare

posted @ 2023-02-14 11:47  Hey,Coder!  阅读(20)  评论(0)    收藏  举报