Reputation: 4922
Git is not ignoring file permission changes even filemode = false
. In my global file file-mode is off but whenever i changes permission for any folder in my project it is tracking and showing in diff. i don't want to track my permission changes at all.
settings in my ~/.gitconfig
[core]
editor = vim
autocrlf = false
filemode = false
git version 2.7.4
Upvotes: 1
Views: 463
Reputation: 11018
Existing repositories typically are not affected by your changing the global setting.
From git-config(1):
git config will only ever change one file at a time.
Creating a new repo (git init
) puts an explicit filemode
line in the newly created local .git/config
file; even when the global ~/.gitconfig
file has no such line (in which case the hard-coded default value true
will be used). Changing the global configuration afterwards will not change that; it will only affect subsequent git-inits.
With thanks to @jeremyclarke for his valuable comment on this answer:
PLEASE add a second warning to this answer, stating that the global setting won't be applied to existing repos! For each repo you need to run the local command (or it seems "git init" has the same effect). This will affect pretty much everyone and can be extremely confusing (esp. when you first interact with a second repo and have no idea why the global setting isn't working when it worked on the first repo, where you ran both the global and local versions of the setting change.)
Upvotes: 3