1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| git config --global user.email "xx@qq.com" git config --global user.name "xx"
git config --list # 查看配置的信息
# 设置低速超时时间为999999秒(几乎不超时) git config --global http.lowSpeedLimit 0 git config --global http.lowSpeedTime 999999
# 设置HTTP缓冲区大小为500MB(默认通常较小) git config --global http.postBuffer 524288000
# 设置压缩级别(0-9,0是不压缩,9是最大压缩) git config --global core.compression 0
# 设置并行下载数量-启用并行下载(同时下载多个对象) git config --global fetch.parallel 10
# 设置连接超时(单位:秒,建议设为300) git config --global http.timeout 300 # 设置拉取/推送超时 git config --global fetch.timeout 300 # 设置SSH连接超时(若用SSH协议) git config --global ssh.connectTimeout 300
# 浅克隆(--depth=1 仅拉取最新提交) git clone --depth=1 https://github.com/xxx/xxx.git # 若需要完整历史,克隆后补全 cd xxx git fetch --unshallow
|