git diff “old mode 100755 new mode 100644”

What git is trying to say here is that the mode of the files have changed, the content of the file is still the same.

If this is common and the filemodes are not important for this project we can simply tell git to ignore this.

Either by telling git to do this as default or only for this project.

Default

git config core.filemode false

Only for this project edit .git/config

[Core]
filemode = false

And in case we do need to check in single filemode changes the following works

git update-index --chmod=(+|-)x path/to/file

One thought on “git diff “old mode 100755 new mode 100644”

  1. Good thing. I searched old mode new mdoe on google and this was post looked helpful in the search result and gave me the satisfactory explanation. Thanks

Comments are closed.