Configure line endings

Git, Repository, Configuration · Apr 13, 2021

Configures the line endings for a repository.

  • Use git config core.eol [lf | crlf] to configure the line endings.
  • lf is the UNIX line ending (\n), whereas crlf is the DOS line ending (\r\n).
git config core.eol [lf | crlf]
git config core.eol lf # Configured to use UNIX line endings

Written by Angelos Chalaris

I'm Angelos Chalaris, a JavaScript software engineer, based in Athens, Greece. The best snippets from my coding adventures are published here to help others learn to code.

If you want to keep in touch, follow me on GitHub or Twitter.

More like this