Git没有警告写得不好的空白

Voj*_*ěch 2 git whitespace

我已经设置了git的配置,以便'git config --list'给出以下内容:

core.editor=vim
core.whitespace=trailing-space,space-before-tab,indent-with-non-tab
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
Run Code Online (Sandbox Code Playgroud)

但是,当我想提交文件whit尾随空格或其他空白问题时,它永远不会抱怨.不知道我能做什么.

man*_*lds 6

为了在提交期间警告你,我相信你必须写一个pre-commit钩子来检查适当的空格并警告你.

有关删除空格的相关问题:在提交之前使git自动删除尾随空格