1.拉去大项目
GitHub拉取大一点的项目会报以下错误:
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
fatal: The remote end hung up unexpectedlyiB | 31.00 KiB/s
fatal: early EOF
fatal: index-pack failed
这里尝试一种方法,原文链接是:https://stackoverflow.com/questions/38618885/error-rpc-failed-curl-transfer-closed-with-outstanding-read-data-remaining
$ git clone http://github.com/yours --depth 1
$ cd yours
$ git fetch --unshallow
先clone一层,然后进入你的项目路径更新
2.更新项目
先在github网站上更新,参考文章:https://blog.csdn.net/qq1332479771/article/details/56087333
git remote -v
#查看源
$ git remote add upstream git@github.com:yours.git
#添加源upstream
只拉一层后再更新最新的提交,最后合并
$ git fetch upstream --depth 1
#只拉取最新的更改
cd yours
$ git fetch --unshallow
$ git merge upstream/master
git push
以上