git update-index -chmod只有+x和-x两个选项,+x=755,-x=664,git -help COMMAND 可以查看对应命令的使用方法,git -help -a查看全部命令。

C:\Temp\TestRepo>git update-index --chmod=+x foo.sh
C:\Temp\TestRepo>git ls-files --stage
100755 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0       foo.sh

参考资料:
https://stackoverflow.com/questions/21691202/how-to-create-file-execute-mode-permissions-in-git-on-windows

Q.E.D.


知之为知之