Sometimes you want to have a very relaxed set of file permissions on your local development source, but setting new file permissions will be reflected in the Git repository and before you know it, you are committing file mode changes to every file in your repos.

At other times your productions file permissions will cause some conflict when trying to pull new updates to the server.

From my point of view, it is the exception rather than the rule, that you want to commit file mode changes when working with website development and use Git as part of your deployment scheme.

You can tell Git to ignore file mode changes by changing the core.filemode setting to false. Either you open your .git/config file and change the value manually or you can simply run the
git config command like this:

git config core.filemode false

For Janitor projects

If you are running a Janitor project, or any other setup including submodules, you'll want to set the filemode for the submodules as well.

Janitor project in LIVE environment

sudo git config core.filemode false
cd submodules/janitor && sudo git config core.filemode false && cd ../..
cd submodules/js-merger && sudo git config core.filemode false && cd ../..
cd submodules/css-merger && sudo git config core.filemode false && cd ../..

Janitor project in LOCAL environment

git config core.filemode false
cd submodules/janitor && git config core.filemode false && cd ../..
cd submodules/js-merger && git config core.filemode false && cd ../..
cd submodules/css-merger && git config core.filemode false && cd ../..

That's it. File mode changes stays on your local machine.