Git marks the unmodified file as the modified status and the git file as the status.

Source: Internet
Author: User

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.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.