git 仓库迁移 代码迁移

xiaoxiao2025-09-15  299

亲测有效

git clone --mirror git@oldserver:oldproject.git cd oldproject.git git remote add new git@newserver:newproject.git git push --mirror new

 

https://stackoverflow.com/questions/1484648/how-to-migrate-git-repository-from-one-server-to-a-new-one

 

注意

git remote rename origin old-origin

git remote add origin git@【你们公司的git的ip或者 git域名】:user_tech_app/iOS_student_code.git 

git push -u origin --all (这个只能把本地的迁移过去,非本地的迁移不过去)

git push -u origin --tags

 

转载请注明原文地址: https://www.6miu.com/read-5036393.html

最新回复(0)