Monday, 14 November 2016

Git ignore file permission changes

Sometime you change the mode of files of your project.

Git chmod

sudo chmod -R 777 /var/www/project

But files are not modified in the repo. check the modified files in git status. so git show all these files are modified.

So you can remove these files from modified using this command.

git config core.fileMode false

       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.

git -c core.fileMode=false diff

And the --global flag will make it be the default behavior for the logged in user.

git config --global core.fileMode false

I hope this post will help you.

Featured post

How to create dynamic schema in mongodb

Sometime what we need in our application is to create mongodb schema for collection and some of our collection schema are same but names are...

Popular Posts