Git conflicts caused by File Permission modification and methods for ignoring File Permissions
When we use git for version management, sometimes we only modify the file permissions, such as pack. php is changed to 777, but the file content has not changed, but git will think that the file has been modified because git regards the File Permission as part of the file difference. Perform the following test:
1. Modify the file permissions of the version library and use diff to view the changes.
As you can see, git also adds the File Permission to version management.
2. clone the version library in another location, modify the pack. php file, and submit it.
3. Update the content under the original library.
$ Git pull
The prompt conflict is displayed.
Solution:
You can add the configuration for ignoring file permissions in git as follows:
$ Git config core. filemode false
In this way, the object ACL is ignored. View the Configuration:
$ Cat. git/config
Then update the code.