GIT配置

来源:互联网 发布:通达信软件官网 编辑:程序博客网 时间:2024/06/06 19:09

1.window下的CRLF与Linux下的LF

  • 提交时转换为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

2.别名配置

git config --global alias.st status
git config --global alias.co checkout
git config --global alias.ci commit
git config --global alias.br branch

原创粉丝点击