# .gitattributes not forcing EOLs correctly for a CRLF-ending file on *NIX

2 messages from 2011-07-22 to 2011-07-22. Participants: Adam Monsen.
Thread: https://gitlist.dev/t/27887

## Adam Monsen, 2011-07-22 13:34

Subject: .gitattributes not forcing EOLs correctly for a CRLF-ending file on *NIX
Message-ID: <4E297C5C.8030104@gmail.com>
URL: https://gitlist.dev/e/4E297C5C.8030104%40gmail.com

```
Anyone have ideas why my .gitattributes file isn't working?

Repo:  git://chordii.git.sourceforge.net/gitroot/chordii/chordii

File "INSTALL.WINDOWS" (in the top-level directory of the repo) should
always have crlf line endings, but my git 1.7.4.1 client says the file
is modified after a fresh clone. I'm on Ubuntu GNU/Linux, I have
core.autocrlf set to "input". The top-level .gitattributes file contains
one line: "INSTALL.WINDOWS eol=crlf".

More likely I'm misusing .gitattributes or the core.autocrlf setting.

```

## Adam Monsen, 2011-07-22 13:56

Subject: Re: .gitattributes not forcing EOLs correctly for a CRLF-ending file on *NIX
Message-ID: <4E29818B.40707@gmail.com>
URL: https://gitlist.dev/e/4E29818B.40707%40gmail.com
In-Reply-To: <4E297C5C.8030104@gmail.com>

```
I wrote:
> Anyone have ideas why my .gitattributes file isn't working?

drizzd on #git helped me out!

I went ahead and committed the file, and git replaced the line endings.
drizzd said the repository (the file object, I guess?) contained a file
with CRLF line endings, instead of LF line endings. But in my
checked-out version, I correctly see a file with CRLF line endings. Yay!

I generally follow the advice at http://help.github.com/line-endings/ in
terms of the core.autocrlf setting.


```
