A
A
ainu2012-05-08 17:49:56
linux
ainu, 2012-05-08 17:49:56

How not to commit file permission changes?

If we change file permissions in a git project (for example, we give permission to write or remove it), git will try to fix all this when committing. The result is a huge commit listing all the files. At the same time, on a windows machine, before pushing, we are forced to do an absolutely useless pull, which essentially does not change anything (in the context of Windows). It also happens that when you transfer a project from a windows system to Linux, the same thing happens.
Probably, someone needs this and did it for good reason, but is it possible to “ask” git not to commit changes to file and folder permissions (as, for example, you can “ask” not to touch line endings and not change them between Windows and Linux)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
denver, 2012-05-08
@ainu

git config core.filemode false

A
akral, 2012-05-08
@akral

let's say we give permission to write or remove it

Git only monitors the execute permission ( ±x).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question