I'm working with a few other people editing some CSV files collaboratively which are stored in a repository on Github. We have collaborators using Windows, OS X, and Linux, so to deal with differences in line endings and local Git settings, I added a .gitattributes file with the following:
* text=auto
People are using Excel to edit these CSV files, then saving and committing. Sometimes on commit the file seems to have no line endings at all; lines are terminated by a carriage return (\r). Github then sees these files as one big line, and thinks the entire file has been deleted and replaced by one long line. Here's an example of such a commit:
https://github.com/weecology/neonetods/commit/7e10cb2913ca2e214c49944b4856519cab9bad96
If you were to check out the file, you'd see that each line ends with a \r. This has happened to two people now after simply editing and saving the file in Excel, on both Mac and Windows.
This is causing conflicts where there shouldn't be conflicts and making it hard to track the provenance of each file. Does anyone have any idea how this could be happening or how we could resolve it?