Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6070279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:54:54+00:00 2026-05-23T09:54:54+00:00

git config –global core.autocrlf input according to this github help page this should configure

  • 0

git config --global core.autocrlf input

according to this github help page this should configure git so it converts all line-endings to LF when committing.

Yet when commiting to my repo this is the output i get.

> git commit -am "test commit"
warning: LF will be replaced by CRLF in .htaccess.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in .htaccess.
The file will have its original line endings in your working directory.
[release/4.2 27bad5b] test commit
warning: LF will be replaced by CRLF in .htaccess.
The file will have its original line endings in your working directory.
 1 files changed, 1 insertions(+), 1 deletions(-)

I then checked my config to see if the autocrlf option was correctly set and it was.

> git config -l | grep "crlf"
core.autocrlf=input

Why does git say that it is converting my LF to CRLF and not the other way around which is what i’m looking for?

And why does it complain 3 times? Is it because it found 3 occurrences that will be replaced? Why does it warn me one time after outputting the commithash then?

I’m confused (and on a Mac for the record :))

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:54:55+00:00Added an answer on May 23, 2026 at 9:54 am

    After a long time with dealing with line endings, I simply won’t allow any tooling, including VCS change them on me.

    I now use autocrlf false and core.whitespace cr-at-eol. This gets rid of the nasty ^M in diff output. This is just a highlighting addition that git does to show you creepy things like extra whitespace at the end of a line or just before a tab, etc.

    Hopefully you can do the same and be done with line ending madness forever too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If you set something like this on Windows: git config --global core.autocrlf false Where
Github has the following recommendation for global git configuration ~/.gitconfig : [alias] # Is
Can I ignore files locally without polluting the global git config for everyone else?
Why do I see the following warning? $ git config --global http.proxy http://172.19.18.22:8080 warning:
I need help in understanding git rebase for this situation. I checked out a
I previously changed my git diff tool with git config --global diff.external <diff-tool-name> .
I just entered the command: git config core.sharedrepository 1 and I am now receiving
I have set up my name and email as follows git config --global user.name
Question What's the difference between: $ git remote add origin git@github.com:yourname/yourproject.git $ git config
New to Git. Followed all the directions from github help pages but simple commands

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.