Git marks the unmodified file as the modified status and the git file as the status.
When using Netbeans as the development environment and Git as the code management in the Ubuntu system in the past few days, the system prompts that the code is marked as changed, but during careful comparison, but it was not modified ..
After reading the following articles, I compared my actual situation and found that when I cloned the code, I intentionally executed chmod 777 on the entire project directory, that's why I encountered a problem!
Http://blog.sina.com.cn/s/blog_6accbcc30101fcac.html
A bunch of people on stackoverflow encountered this problem. Most of them were caused by different lineending, such as windows and mac. I tried to modify the git configuration and add core. autocrlf = false (run gitconfig -- system. The core. whitespace = cr-at-eol cannot be modified.
Then I suddenly found that my sourcetree showed a prompt for modification: modified, mode 100644 to mode 100755. Suddenly I remembered that I had executed chmod777 in the project folder, that is to say, git regards that the permission of the file has changed, so it marks the file as changed, but we cannot see the difference when looking at gitdiff or comparison.
Then, modify the git configuration and add core. filemode = false. if it finds that it still does not work, it is estimated that my local operation is wrong, and this setting does not work.