https://help.github.com/articles/dealing-with-line-endings#refreshing-a-repository-after-changing-line-endings
Refreshing a repository after changing line endings
After you've set the core.autocrlf option and committed a .gitattributes file, you may find that Git wants to commit files that you have not modified. At this point, Git is eager to change the line endings of every file for you.
The best way to automatically configure your repository's line endings is to first backup your files with Git, delete every file in your repository (except the .git directory), and then restore the files all at once.
Save your current files in Git, so that none of your work is lost.
git add . -u git commit -m "Saving files before refreshing line endings" Remove every file from Git's index.
git rm --cached -r . Rewrite the Git index to pick up all the new line endings.
git reset --hard Add all your changed files back, and prepare them for a commit. This is your chance to inspect which files, if any, were unchanged.
git add .
Commit the changes to your repository.
git commit -m "Normalize all the line endings" Thanks to Charles Bailey's post on Stack Overflow for the basis to this solution.