Git备忘

常用

# 提交时转换为LF,检出时转换为CRLF
git config --global core.autocrlf true

# 提交时转换为LF,检出时不转换
git config --global core.autocrlf input

# 提交检出均不转换
git config --global core.autocrlf false

# 拒绝提交包含混合换行符的文件
git config --global core.safecrlf true

# 允许提交包含混合换行符的文件
git config --global core.safecrlf false

# 提交包含混合换行符的文件时给出警告
git config --global core.safecrlf warn

参考文档

Pro Git

https://git-scm.com/docs/gitattributes

https://git-scm.com/docs/gitignore

https://github.com/github/gitignore

工具

https://git-scm.com/downloads

https://www.sourcetreeapp.com/

参考博文

posted @ 2022-10-20 22:55  4thirteen2one  阅读(15)  评论(0编辑  收藏  举报