This is a Linux 2.6 kernel repository. I git clone it to my local host.
After that. I didn\'t make any change. But when I \"git status\". I found 13 modified files.
this problem was caused, for me, by a non-case-sensitive filesystem (e.g. on Mac OS). You can either create a case-sensitive disk image and mount it and do your git work on there, or use a different OS to do your development.
If you would like to remove all the files and modifications that differ from your origin branch but would like to keep all the ignored files (ex. node_modules, .vscode, .idea etc..) the best choice is to combine these two commands:
git reset --hard && git clean -f
This will reset all modified files and will clean all the unstaged ones.
A git reset --hard HEAD
should solve the problem.
There's another possibility where the issue is filemode-related. In that case you may try git config core.filemode false
More info: How do I make Git ignore file mode (chmod) changes?
Edit:
Another possibility would be the line endings, try setting git config core.autocrlf true|false|input
and see if it makes any difference.
More info: Why should I use core.autocrlf=true in Git?