100字范文,内容丰富有趣,生活中的好帮手!
100字范文 > GIT使用踩坑!!!我的妈妈呀 烦死了烦死了烦死了!!!

GIT使用踩坑!!!我的妈妈呀 烦死了烦死了烦死了!!!

时间:2019-06-20 12:08:26

相关推荐

GIT使用踩坑!!!我的妈妈呀 烦死了烦死了烦死了!!!

问题1:Git:RPC failed;curl 56 OpenSSL SSL_read:Connection was reset,errno 10054

原因:

文件太大,上传失败

方法:

初始化:git init关闭远程:git config --global pression 0重新克隆:git clone url地址增大流量:git fetch --depth=2147483647提交代码:git pull --all

原答案:

First, turn off compression:

git config --global pression 0

Next, let’s do a partial clone to truncate the amount of info coming down:

git clone --depth 1 <repo_URI>

When that works, go into the new directory and retrieve the rest of the clone:

git fetch --unshallow

or, alternately,

git fetch --depth=2147483647

Now, do a regular pull:

git pull --all

I think there is a glitch with msysgit in the 1.8.x versions that exacerbates these symptoms, so another option is to try with an earlier version of git (<= 1.8.3, I think).

问题2:git:fatal:Unable to create"…/.git/index.lock

原因:

报错大致意思就是创建index.lock文件失败,因为已经存在index.lock文件了

方法:

命令删除:rm -rf .../.git/index.lock电脑直接搜索删除前提是必须先关闭GIT,否则不能直接删除index.lock作用:在进行某些比较费时的git操作时自动生成,操作结束后自动删除,相当于一个锁定文件,目的在于防止对一个目录同时进行多个操作。有时强制关闭进行中的git操作,这个文件没有被自动删除,之后你就无法进行其他操作,必须手动删除。

问题3:提示warning: There are too many unreachable loose objects; run ‘git prune’ to remove them.

原因:

因为提交的改动过多,导致本地的缓冲区占用太大

方法

瘦身优化本地项目:git gc --prune=now

问题4:git 错误 Reinitialized existing Git repository

原因

没有原因,我也不知道原因,妈的!直接删除项目下的.git文件夹,重新拉项目吧

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。