Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

If you have a file added to a Git repository and you change the execution permission (e.g. chmod 0755 file), Git tells that file has changed.

This can be useful, but sometimes is a pain in the neck when you are working on a web application and server permissions differs from you computer permissions.

Does anyone know why Git behaves like this? Is there a security/performance/any other reason to do that?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

You can

git config core.filemode false

to turn this feature off.

The idea of keeping track of the x bit is to make life easier for people cloning the repository as it might contain some scripts (like configure) that need to be executable for building the project.

Instead of just whole-sale turning it off, why not fixing the mode once and then keeping it the same?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.