How to disable (permission) mode of the file in GIT?

4

I'm working with GIT here at the company where I work, along with two other programmers.

Every time I make a git pull , whose changes were sent by these two programmers, I always have a problem with the permission of the file or the folder they sent.

I noticed that these two programmers liked to run the GIT commands after using sudo su and log in with this "Super User". But I do not do that. I use my user normally and, when necessary, always run the sudo command before the other commands.

And I think this is recommended as some programs like git , composer , bower or nodejs generally recommend that you do not use sudo when we're going to run them , just because of file permissions.

It seems to me that this is really the problem. And every time, I have to keep running the sudo chmod -R 777 . command to solve this. And this is becoming tiresome! .

Suppose I can not convince my co-workers to stop using sudo su , would I have any way to disable the modo (the permission values) of the file?

That is, I do not want git to add more information if a file is writable or not, and these things.

I would like all files to always be "recognized" as 0777.

How to do this in GIT ? How to disable this change mode that always appears when I give git pull ?

    
asked by anonymous 31.05.2016 / 16:24

1 answer

5

Just change the% repository% setting:

git config core.fileMode false

If you want to disable this for all repositories of your user, add flag core.filemode :

git config --global core.fileMode false
    
31.05.2016 / 16:32