问题
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