Question

I have a git repository I originally used with msysgit, but now I've begun to use github instead. For some reason, when I add the default recommended .gitattributes file to deal with line endings, most of the files in the repository need to be recommitted. Is this supposed to happen? I'm currently on a Windows computer and use Assembla.com as the central origin repo.

Was it helpful?

Solution

It depends on the exact configuration you are using in your .gitattributes

From the gitattributes docs:

End-of-line conversion

While git normally leaves file contents alone, it can be configured to normalize line endings to LF in the repository and, optionally, to convert them to CRLF when files are checked out.

So it seems there are certain configurations where it will modify the contents of the files to change their line endings, thus resulting in the repo wanting you to commit the changes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top