eol

[!NOTE|label:references:]

list

  • or

list config

  • get all config : --get-all

  • get active config : --get

  • core.eol

  • core.safecrlf

check one by one

  • worktree

  • local

  • system

  • global

theory

core.autocrlf

parameters

core.autocrlf
false
input
true

git commit

lf > lf cr > cr crlf > crlf

lf > lf cr > cr crlf > lf

lf > lf cr > cr crlf > lf

git checkout

lf > lf cr > cr crlf > crlf

lf > lf cr > cr crlf > crlf

lf > lf cr > cr crlf > crlf

normally, it will looks like

set in GUI

git line ending setup
  • checkout Windows-style, commit Unix-style line endings:

  • Checkout as-is, commit Unix-Style line endings:

  • Checkout as-is, commit as-is:

eol

This attribute sets a specific line-ending style to be used in the working directory. It enables end-of-line conversion without any content checks, effectively setting the text attribute. Note that setting this attribute on paths which are in the index with CRLF line endings may make the paths to be considered dirty. Adding the path to the index again will normalize the line endings in the index.

practice

force using lf in both remote and local

  • or

Last updated

Was this helpful?