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: readme.txt
# modified: requirements.txt
#
no changes added to commit (use "git add" and/or "git commit -a")
I didn’t make any changes on those files. But I’m getting this message even if I try:
git checkout -- readme.txt
git checkout -- requirements.txt
When I run:
git diff
it shows the whole file as updated. But the contents are the same.
I tried to delete them and checkout again, but it didn’t work.
If you can avoid any eol conversion , try:
(my preferred configuration)
, and clone again your repo to see if the issue persist (clean status instead of “all files modified”).
If your editors support other eol style and don’t make any conversion, you won’t be bothered again.