设置默认用户名和密码
git config --global user.name "xxxxxx"
git config --global user.email "xxxxxx"
换行符处理
1、(Windows系统)提交时自动地把行结束符CRLF转换成LF,而在签出代码时把LF转换成CRLF
git config --global core.autocrlf true
2、(Linux或Mac系统)使用LF作为行结束符,在提交时把CRLF转换成LF,签出时不转换
git config --global core.autocrlf input
这样会在Windows系统上的签出文件中保留CRLF,会在Mac和Linux系统上,包括仓库中保留LF
3、开发仅运行在Windows上的项目,可以设置false取消此功能,把回车符记录在库中
git config --global core.autocrlf false
缓存
缓存输入的用户名和密码
git config --global credential.helper wincred
清除缓存
清除掉缓存在git中的用户名和密码
git credential-manager uninstall
网友评论