#全局配置
git config --global core.autocrlf false
#仓库单独配置,在仓库目录下执行
git config core.autocrlf false
core.autocrlf
有以下三种配置,建议设置为false
:
- false:不进行换行符的自动转换,保留文件的原始换行符。
- true:启用换行符自动转换。
- input:仅在提交时将 CRLF 转换为 LF,但签出时不做任何转换。
~/.ssh/config
文件中进行配置,需要使用代理的话提前安装 corkscrew :
Host your_repository_host
HostName your_repository_host
User testuser
IdentityFile your_private_key_path
ProxyCommand /opt/homebrew/Cellar/corkscrew/2.0/bin/corkscrew your_proxy_ip your_proxy_port %h %p