git项目迁移

克隆代码包括提交记录,复制一份到远程仓库。

文章目录

异常

error: remote unpack failed: index-pack abnormal exit
Everything up-to-date

git项目迁移

方法步骤

克隆代码包括提交记录,复制一份到远程仓库。

  1. 拉取就git代码

git clone --bare http://172.16.88.190/memoryTao/project.git

  1. 进入目录

cd project.git/

  1. 推送到新git

git push --mirror http://172.16.88.112/app/project.git

一些异常问题

问题1

$ git push --mirror http://1.0.0.0:9000/ceshi
Enumerating objects: 38952, done.
Counting objects: 100% (38952/38952), done.
Delta compression using up to 8 threads
Compressing objects: 100% (9396/9396), done.
Writing objects: 100% (38952/38952), 164.04 MiB | 293.15 MiB/s, don
Total 38952 (delta 19952), reused 38952 (delta 19952), pack-reused
error: RPC failed; HTTP 502 curl 22 The requested URL returned erro
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
Everything up-to-date

这个很有可能是git服务端问题,目前在排查

问题2

error: RPC failed;  
curl 55 Send failure: Connection was aborted,error: remote unpack failed: index-pack abnormal exit

整个项目文件一定过大,修改 git 缓冲区大小很有必要。

git config --global http.postBuffer 1048576000

上一篇:npm run build 报错,Build failed with errors


下一篇:Ubuntu16.04中VSCode提取扩展时出错:XHR failed