码迷,mamicode.com
首页 > Windows程序 > 详细

windows git安装后更换the line ending conversions

时间:2016-09-07 23:23:41      阅读:529      评论:0      收藏:0      [点我收藏+]

标签:更换the line ending conversions

Is there a file or menu that will let me change the settings on how to deal with line endings?

There are 3 options:

  1. Checkout Windows-style, commit Unix-style line endings Git will convert LF to CRLF when checking out text files. When committing text files, CRLF will be converted to LF. For cross-platform projects, this is the recommended setting on Windows ("core.autocrlf" is set to "true")

  2. Checkout as-is, commit Unix-style line endings Git will not perform any conversion when checking out text files. When committing text files, CRLF will be converted to LF. For cross-platform projects this is the recommended setting on Unix ("core.autocrlf" is set to "input").

  3. Checkout as-is, commit as-is Git will not perform any conversions when checking out or committing text files. Choosing this option is not recommended for cross-platform projects ("core.autocrlf" is set to "false")

方法:

The normal way to control this is with git config

For example

git config --global core.autocrlf true

For details, scroll down in this link to Pro Git to the section named "core.autocrlf"


If you want to know what file this is saved in, you can run the command:

git config --global --edit


windows git安装后更换the line ending conversions

标签:更换the line ending conversions

原文地址:http://tianshili.blog.51cto.com/5050423/1847336

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!