Replace the line ending conversions after installing Windows git

Source: Internet
Author: User

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

There is 3 options:

  1. Checkout Windows-style, commit unix-style line endings Git would convert LF to CRLF when checking out text files. When committing text files, CRLF is converted to LF. For Cross-platform projects, this is the recommended setting on Windows ("Core.autocrlf" are set to "true")

  2. Checkout As-is, commit unix-style line endings Git won't perform any conversion when checking out text files. When committing text files, CRLF is converted to LF. For Cross-platform projects the recommended setting in Unix ("Core.autocrlf" is set to "input").

  3. Checkout As-is, Commit As-is Git won't perform any conversions when checking out or committing text files. Choosing this option isn't recommended for Cross-platform projects ("Core.autocrlf" is set to "false")

Method:

The normal-the-control-git config

For example

git config--global core.autocrlf true

For details, scroll-the-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


Replace the line ending conversions after installing Windows git

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.