GIT picking up whitespace changes it shouldn't

ⅰ亾dé卋堺 提交于 2019-12-13 01:26:08

问题


After running our build process, some files are showing up in SourceTree with whitespace-only changes. Leaving aside discussions about whether auto-generated files should be included in source control, my problem is this:

Files show up in the uncommitted window. If I attempt to commit them, I get the error below.

Ideally I'd like to have SourceTree be smart enough to not display these files as modified in the first place. Is there a good way to accomplish this?

git -c diff.mnemonicprefix=false -c core.quotepath=false commit -q -F C:----\fc1hkokv.mod -- ----.js

On branch feature/14006-clinical-notes Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git checkout -- ..." to discard changes in working directory)

modified: xxxx.js no changes added to commit (use "git add" and/or "git commit -a")

warning: LF will be replaced by CRLF in xxx.js. The file will have its original line endings in your working directory.

来源:https://stackoverflow.com/questions/30603750/git-picking-up-whitespace-changes-it-shouldnt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!