git仓库完整迁移,五步就够了。ps:不需要单独迁移分支

1.本地新建文件夹 然后通过git进入该文件夹下
2.git clone --mirror //之前的仓库地址例如(git clone --mirror  http://xxx/xx/xx.git)。执行完毕后该文件夹下会产生.git文件。
3.cd 进入.git文件 
4.git remote set-url origin //新仓库地址例如(git remote set-url origin http://xxx/xx/xx.git)。
5.git push -f origin  

你可能感兴趣的:(git仓库完整迁移,五步就够了。ps:不需要单独迁移分支)