When we use git for versioning , sometimes we just modify the permissions of the file, such as changing the pack.php to 777, but the file content does not change, but git will think that the file has been modified, The reason is that git also counts file permissions as part of the file differences. Here's a test:
1. Modify the permissions of the repository file, and then use diff to view the changes.
You can see that git also includes file permissions in version management .
2, in another Place clone this repository, modify the pack.php file, and then submit.
3. Update the content below the original repository.
$ git pull
You can see a prompt conflict.
Workaround:
In Git, you can add a configuration that ignores file permissions, as follows:
$ git config core.filemode false
This sets the Ignore file permission. View the following configuration:
$ cat. Git/config
Then update the code is OK.
Welcome reprint but please indicate Magento blog from Jonas!
Git's approach to conflicts caused by file permissions modification and ignoring file permissions