我已经设置了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
但是当我想提交一个文件whit尾随空格或其他空白问题时,它永远不会抱怨。不知道我能做什么。
答案 0 :(得分:5)
为了在提交过程中警告你,我相信你必须编写一个pre-commit
钩子来检查相应的空格并警告你。
有关删除空格的相关问题:Make git automatically remove trailing whitespace before committing