git保留历史记录迁移远程仓库

删除原来的远程地址

git remote remove origin

添加新的远程地址

git remote add origin http://git.zhenyuan.cool/wzy/xxxxxx.git

推送代码到新仓库

git push --set-upstream origin main

获取原项目git的bare版本库

git clone --bare [email protected]:xwzy/xxxxxx.git

原项目所有分支同步到新仓库

git push --mirror   http://git.zhenyuan.cool/wzy/xxxxxx.git