git line endings

2 views
Skip to first unread message

L. V. Lammert

unread,
Oct 24, 2019, 11:07:56 AM10/24/19
to Must be gmail LVLammert
Hey all you git eggsperts, .. how in the heck does one get git and
gitdiff to ignore line endings? (Working on a project where the devel is
using a Windoze editor, ..)

THe best hint I found online was .gitattributes, with:

# Ignore all differences in line endings
* -crlf

However that DNW, neither does core.autocrlf; is something else required
or a different approach?

TIA!!

Brian Hicks

unread,
Oct 24, 2019, 11:14:06 AM10/24/19
to vim-...@googlegroups.com
I believe the syntax in .gitattributes would be:

* text eol=crlf

the docs say that this only takes effect on checkin/checkout, so you may have to do them all by hand once before you see changes.

However, I have never had the occasion to test this myself, so maybe this advice does not work! Hope it helps, though.
Reply all
Reply to author
Forward
0 new messages