1. 查看git的config配置
设置filemode = false
$ cat .git/config
[core]
repositoryformatversion = 0
filemode = false #文件的属性
bare = false
logallrefupdates = true
2.忽略当前目录下git文件权限变更
$ git config core.filemode false
转载自链接:https://www.jianshu.com/p/a8a8998764bd