【问题标题】:git config --global core.filemode false does not work with git diffgit config --global core.filemode false 不适用于 git diff
【发布时间】:2015-06-01 16:31:28
【问题描述】:

我已经设置了

 git config --global core.filemode false

并检查了git config -l我的配置是否正常

...
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
core.autocrlf=false
...

但是当我输入git diff foo 时,我得到了这个:

diff --git a/.gitignore b/.gitignore
old mode 100755
new mode 100644
diff --git a/Makefile b/Makefile
old mode 100755
new mode 100644
diff --git a/config.ini b/config.ini
old mode 100755
new mode 100644
...

我在我的内部导入了一个远程存储库:

git remote add foo //192.168.1.42/foo/
git pull foo master
git checkout -b foo foo/master
git diff master

我的错误在哪里?

【问题讨论】:

  • 你能成功吗?下面的答案对我的情况没有影响

标签: git


【解决方案1】:

确保您没有该设置的多个条目并将其设置为本地而不是全局:

git config --global --unset-all core.filemode
git config --unset-all core.filemode
git config core.filemode false

【讨论】:

  • @nowox 你能试试git reset -- .gitignore吗?又是git add -- .gitignore
  • 我的git statusOn branch foo\n nothing to commit, working directory clean
  • @nowox 奇怪,你用的是什么版本的 Git?你对 Git 2.4.2 有同样的看法吗 (github.com/git-for-windows/git/releases)
  • 2.1.4 和 2.4.0 之间的行为相同
  • 我还没有安装
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-10-30
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多