Line endings with cygwin and Github for Windows
cygwin, git, github-for-windows
Solution
This is a GHfW bug which occurs when your repository configuration and the data in your repository do not agree.
If you configure a file to be translated to CRLF line endings - by setting `core.autocrlf` to `true`, for example, but you have blobs in your repository that are already in CRLF format (likely because somebody hasn't set `core.autocrlf` to true) then this problem can occur.
In this case, GHfW translates the CRLFs in the repository differently than msysgit. As a result, some or all files appeared dirty.
I would recommend a consistent approach to your CRLF across your team to avoid any ambiguity by git tools as to what they should do with your line endings. That said, this bug was recently fixed in libgit2, the library that underlies GHfW, and should makes its way into GHfW soon.
Problem
I'm want to be able to work on my git projects using both the Github for Windows application as well as git in the command line using Cygwin (on Windows). But I keep on getting problems with the line endings when I switch from one to the other. If with the command line tool the repo has no changes, it will want to modify all the files with the Github app. If I do the changes with the Github app it will then again want to change it with the command line tool. After a fair amount of testing I couldn't make it work for both tools. What would make it work? In the .gitatributes I currently have set: * text=auto But it doesn't help