Git问题汇总
1.取消全局代理
一般报错Failed to connect to github.com port 443 after 21089 ms: Couldn’t connect to server
取消全局代理:
git config --global --unset http.proxygit config --global --unset https.proxy#或者
git config --global http.proxy http://127.0.0.1:7890
2.git 推送出现 "fatal: The remote end hung up unexpectedly" 解决方案
修改提交缓存大小为500M,或者更大的数字
git config --global http.postBuffer 524288000# some comments below report having to double the value:git config --global http.postBuffer 1048576000`
3.git提交大文件(大于100M)报错解决
// 查询文件位置 这个命令提交出错的时候会提示 我们直接复制过来就可以git rev-list --objects --all | grep 3b08a747589895bdc995cd18ae1fe9e70abcd417输入完上面的命令后 就会显示文件位置 比如我这里是 `图片工具/xxx.exe`// 清除掉提交到本地仓库的大文件git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch --ignore-unmatch 图片工具/xxxx.exe'// 再次强制提交git push --force --all最后在删除掉该文件,防止下次又提交该文件