It appears Git is ignoring ~/.gitconfig
$ git config --global core.filemode false
$ git config -l
core.filemode=false
core.filemode=true
So now there are 2 entries for core.filemode
and git is still not ignoring filemode changes
$ touch modetest
$ git add .
$ git commit -m test1
[master (root-commit) 320cfe4] test1
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 modetest
$ chmod +x modetest
$ git diff
diff --git a/modetest b/modetest
old mode 100644
new mode 100755
Based on torek’s answer, I added this line to my .bash_profile
[ -d .git ] && git config core.filemode false
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…