问题:

C:\02gaoke\00Practice>git clone http://git.gaokeyun.cn/yangqiang/seu2021_doc.git
Cloning into 'seu2021_doc'...
remote: Enumerating objects: 632, done.
remote: Counting objects: 100% (632/632), done.
remote: Compressing objects: 100% (596/596), done.
error: RPC failed; curl 56 Recv failure: Connection was reset
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output

原因分析:

分支过多导致的问题

解决办法:

关闭压缩功能

C:\02gaoke\00Practice>git config --global core.compression 0

克隆最近修改的文件

C:\02gaoke\00Practice>git clone --depth 1  http://git.gaokeyun.cn/yangqiang/seu2021_doc.git
Cloning into 'seu2021_doc'...
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), 218 bytes | 19.00 KiB/s, done.

然后获取完整库

C:\02gaoke\00Practice>cd seu2021_doc
C:\02gaoke\00Practice\seu2021_doc>git fetch --unshallow
remote: Total 0 (delta 0), reused 0 (delta 0)

拉取所有数据

C:\02gaoke\00Practice\seu2021_doc>git pull --all
Fetching origin
Already up to date.

本地创建分支

C:\02gaoke\00Practice\seu2021_doc>git branch
* master

C:\02gaoke\00Practice\seu2021_doc>git branch yq2021

切换本地分支

C:\02gaoke\00Practice\seu2021_doc>git checkout yq2021
Switched to branch 'yq2021'

添加到本地库

C:\02gaoke\00Practice\seu2021_doc>git add *

C:\02gaoke\00Practice\seu2021_doc>git commit -m "yq2021"
[yq2021 d5cd6e5] yq2021
 1 file changed, 1 insertion(+)
 create mode 100644 "\346\246\202\350\246\201\350\256\276\350\256\241/my.py"

提交到服务器的分支

C:\02gaoke\00Practice\seu2021_doc>git push -u origin  yq2021
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 12 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (4/4), 412 bytes | 206.00 KiB/s, done.
Total 4 (delta 0), reused 0 (delta 0), pack-reused 0
To http://git.gaokeyun.cn/yangqiang/seu2021_doc.git
 * [new branch]  yq2021 -> yq2021
Branch 'yq2021' set up to track remote branch 'yq2021' from 'origin'.