I am using git 1.7.1 on Windows XP with cygwin. The issue can be best illustrated by example:
$ git status
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: system/application/config/email.php
# modified: system/application/config/upload.php
# modified: system/application/views/frontend/business_subscription/start_subscription.php
#
no changes added to commit (use "git add" and/or "git commit -a")
$ git checkout system/application/config/email.php
$ git status
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: system/application/config/email.php
# modified: system/application/config/upload.php
# modified: system/application/views/frontend/business_subscription/start_subscription.php
#
no changes added to commit (use "git add" and/or "git commit -a")
$ git diff -w
Git shows that there are some changes in the listed files but I cannot get rid of the changes- the file is still there. It seems that it only happens to files where there are no changes other than whitespace (because git diff -w does not output anything.
I think this might be caused by git's crlf settings, but I am not sure about it.