Windows git changes to UNIX mode line break solution method

Source: Internet
Author: User
Background

Under each operating system, the text file uses a different line break. Unix/linux uses 0x0A (LF), but Dos/windows always uses 0x0D0A (CRLF) as a newline character.

Problem

You need to change the Windows Git mode dos to UNIX.

Method command
查看当前文本的模式类型,一般为dos,unix:set ff
#提交时转换为LF,检出时转换为CRLFgit config --global core.autocrlf true   #提交时转换为LF,检出时不转换(以上问题使用此命令可解决)git config --global core.autocrlf input   #提交检出均不转换git config --global core.autocrlf false

Windows git changes to UNIX mode line break solution method

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.