Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 6 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .