Stop git from changing line endings on Windows and add support for editorconfig in vim
This commit is contained in:
@@ -1,5 +1,17 @@
|
||||
[code]
|
||||
editor = /usr/bin/vim
|
||||
editor = /usr/bin/vim
|
||||
[core]
|
||||
# Convert unix LF to Windows CRLF when checking out and vice-versa when adding files to the index.
|
||||
autocrlf = true
|
||||
# I used to have this set to true, which would result in checked out files
|
||||
# being converted to CRLF line endings and commits converting to LF. I'm
|
||||
# tired of this conversion shit though so I'm turning it off and will be
|
||||
# enforcing LF line endings via a combination of editorconfig and
|
||||
# gitattribute files on a per-project basis. This should make sure that
|
||||
# anyone contributing to my projects will be committing LF line endings.
|
||||
# The only exception is that the gitattributes files will commit batch
|
||||
# files with CRLF to avoid Windows glitches.
|
||||
#
|
||||
# I used these posts for reference:
|
||||
# https://markentier.tech/posts/2021/10/autocrlf-true-considered-harmful/
|
||||
# https://troyready.com/blog/git-windows-dont-convert-line-endings.html
|
||||
#
|
||||
autocrlf = false
|
||||
|
||||
Reference in New Issue
Block a user