Git ignore file permission change

You have a situation, where you did not edit a file under git version control. But you changed the files permission. By default git will still identify this as a version change.

If you don’t want git to acknowledge file permission as a change, then try this command.

1
git config core.filemode false

git will ignore the file permission(mode) changes made using chmod command

1
2
3
4
5
From git-config(1):
core.fileMode
If false, the executable bit differences between the index and the
working copy are ignored; useful on broken filesystems like FAT.
See git-update-index(1). True by default.