要求能保留原先的commit记录,应该如何迁移呢?
- 从原地址克隆一份裸版本库,比如原本托管于 GitHub,或者是本地的私有仓库
git clone --bare git://192.168.10.XX/git_repo/project_name.git
-
到新的 Git 服务器上创建一个新项目
- 推送到新的git服务器
git push --mirror git@192.168.20.XX/path/to/path/new_project_name.git
转载于:https://blog.51cto.com/ipcpu/2393727