windows换行的Git空格修复
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了windows换行的Git空格修复相关的知识,希望对你有一定的参考价值。
Pre 1.6 git has some annoying whitespace checking in it's pre-commit hook. Rather than turn it off I decided to have a go at an automated method to fix the issue.Running the first line lists the files that have problems. The second just adds a sed to fix the issue
.git/hooks/pre-commit 2>&1 | sed '/^*/d' | sed 's/:.*//' | uniq for FILE in `.git/hooks/pre-commit 2>&1 | sed '/^*/d' | sed 's/:.*//' | uniq` ; do sed -ie 's/[[:space:]]*$//' $FILE ; done
以上是关于windows换行的Git空格修复的主要内容,如果未能解决你的问题,请参考以下文章