Ignore file permission changes in git

If the permission of a file changes inside a git repository,  Git identifies that as a changed file even though you haven’t changed that file. For example if you change a file’s permission from 644 to 755, It will be shown as a modified file. If you don’t want this to be shown as a modified file.

Execute below command in your repository home.

git config core.fileMode false

and if you want to change it for all the git repository in your system.

git config --add --global core.filemode false

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s