1). 从原地址克隆一份裸版本库

git clone --bare git://xxxxx.com/xxx.git

2). 然后到新的 Git 服务器上创建一个新项目

3). 以镜像推送的方式上传代码到 新的 服务器上

cd test.git

git push --mirror git@xxxxx.com/xxx.git

4). 删除本地代码

cd ..

rm -rf test.git

5). 到新服务器上找到 Clone 地址,直接 Clone 到本地

git clone git@xxxxx.com/xxx.git

相关文章:

  • 2022-01-02
  • 2021-08-17
  • 2021-08-02
  • 2021-04-09
猜你喜欢
  • 2021-04-29
  • 2021-08-15
  • 2021-04-09
  • 2021-12-14
  • 2021-08-31
  • 2021-10-27
相关资源
相似解决方案