git on windows shows modified files all the time, even for newly cloned repo

I am having issues with my git on a windows machine. I always have some git files that are modified in every repo, the files that show as modified are same.

If I clone a new repo and use tortoisegit to commit I see some files as modified, even if I never touched a single file in the repo. "gitstatus" doesnt show any modifications though

Any help is appreciated. Thanks


Check if the changes are merely changes in file permissions. This was the reason in my case, both TortoiseGit and Git Extensions displayed unmodified files.

Use git config core.fileMode false to ignore chmod differences (or directly edit the .git/config file).

You may also want to set this as the global config with git config --global core.filemode false .


It's line endings issue. Set this on your windows machine:

git config --global core.autocrlf true

None of the proposed fixes worked for me. However, I had Cygwin installed and TortoiseGit picked up its path when installed. I solved it by installing the official Git package and changed the path in TortoiseGit.

链接地址: http://www.djcxy.com/p/30022.html

上一篇: git用diff创建补丁

下一篇: git在Windows上始终显示修改后的文件,即使对于新克隆的回购