Skip to content

How can I stop this error. LF will be replaced by CRLF the next time Git touches it #66838

Closed Answered by andreslopezferro
Blockheded asked this question in New to GitHub
Discussion options

You must be logged in to vote

This error message is Git's way of warning you that it's going to automatically change line endings in your files to match the expected format for your operating system. It's important to have consistent line endings in a project to avoid conflicts and unexpected behavior.

Configure Git to handle line endings correctly for your operating system by setting the core.autocrlf configuration option.
For Windows:
git config --global core.autocrlf true
For macOS/Linux:
git config --global core.autocrlf input
The "true" setting instructs Git to convert line endings to CRLF when checking out files and to LF when committing files.
In contrast, the "input" setting directs Git to convert line endings…

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
1 reply
@faulknor82
Comment options

Comment options

You must be logged in to vote
3 replies
@dbc60
Comment options

@isimmons
Comment options

@isimmons
Comment options

Answer selected by Blockheded
Comment options

You must be logged in to vote
2 replies
@sulth1
Comment options

@speedy-sasquatch
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment