git status 未显示权限更改

car*_*mba 5 git github

在 git 存储库中,我更改了文件权限。如果我运行命令

git status
Run Code Online (Sandbox Code Playgroud)

或者

git status -v
Run Code Online (Sandbox Code Playgroud)

我没有看到任何变化。它只显示

On branch xxxxx
nothing to commit, working directory clean
Run Code Online (Sandbox Code Playgroud)

但我确实对文件和文件夹更改权限从644777。如何告诉 git 向我显示权限更改?

( git version 2.2.1 and filemode = true)
Run Code Online (Sandbox Code Playgroud)

tom*_*non 3

您可以启用文件模式,Git 还将跟踪文件权限更改。

git config core.filemode true
Run Code Online (Sandbox Code Playgroud)

  • 我明白了,在这种情况下,这个答案应该涵盖您需要的内容 http://stackoverflow.com/questions/3207728/retaining-file-permissions-with-git (2认同)