What does the 'core.autocrlf' setting do in Git?

QuestionsQuestions8 SkillsProGit Config ManagementAug, 18 2025
0503

The core.autocrlf setting in Git is used to manage line endings in text files across different operating systems. It helps ensure that files have consistent line endings when they are checked out and committed.

Here are the common values for core.autocrlf:

  • true: Converts LF (line feed) to CRLF (carriage return + line feed) when checking out files on Windows, and converts CRLF back to LF when committing files.
  • input: Converts CRLF to LF when committing files, but does not change line endings when checking out files. This is typically used on Unix-based systems.
  • false: No conversion is performed. The line endings are left as they are.

Setting this configuration helps prevent issues related to line endings when collaborating on projects across different operating systems.

0 Comments

no data
Be the first to share your comment!