git不提交换行符不一致导致的修改 git "the tex is identical" "but the files do not match"

This seems like a whitespace issue, in order to avoid them in the future, you can setup Git to normalize them.

Windows and UNIX system don't use same line-ending, to prevent conflict from happening based on these, you should setup you git config this way:

  • Windows : git config --global core.autocrlf true
  • Unix : git config --global core.autocrlf input

Next, to make sure we only commit with ideal whitespace rules, you can set this config option:

git config --global core.whitespace trailing-space,space-before-tab,indent-with-non-tab

猜你喜欢

转载自blog.csdn.net/ljh081231/article/details/79557123
今日推荐