260225-git config --global全局配置参数
Created At :
先配置好参数
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| git config --global user.email "css@110.com" git config --global user.name "css"
git config --global http.lowSpeedLimit 0 git config --global http.lowSpeedTime 999999 git config --global http.postBuffer 524288000 git config --global fetch.parallel 10
git config --global http.timeout 300 git config --global fetch.timeout 300 git config --global ssh.connectTimeout 300
git config --global http.postBuffer 524288000 git config --global core.packedGitWindowSize 128m git config --global core.packedGitLimit 128m git config --global core.compression 0 git config --global http.timeout 300 git config --global fetch.timeout 300 git config --global http.keepAlive false
|
Git Clone Depth=1
1 2 3 4 5 6
| # 浅克隆(--depth=1 仅拉取最新提交) git clone --depth=1 https://github.com/xxx/xxx.git
# 若需要完整历史,克隆后补全 cd xxx git fetch --unshallow
|
配置参数中文描述
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
|
未确认配置参数
1 2 3 4 5 6 7 8 9 10 11
| git config --global core.autocrlf input #自动转换坑太大,提交到git是自动将换行符转换为lf
#拒绝提交包含混合换行符的文件 git config --global core.safecrlf true
#允许提交包含混合换行符的文件 git config --global core.safecrlf false
#提交包含混合换行符的文件时给出警告 git config --global core.safecrlf warn
|