【发布时间】:2014-09-03 14:37:53
【问题描述】:
git status 告诉我,很少有文件被修改。但是当我使用以下任何参数执行git diff 时,它是空的。
--ignore-space-at-eol
Ignore changes in whitespace at EOL.
-b, --ignore-space-change
Ignore changes in amount of whitespace. This ignores whitespace at line end, and considers all other sequences of one or more whitespace characters to be equivalent.
-w, --ignore-all-space
Ignore whitespace when comparing lines. This ignores differences even if one line has whitespace where the other line has none.
我已尝试git checkout . 重置此更改,但没有帮助。我怎样才能将这些文件回滚到原始状态(这样它们就不会再被“修改”)或使git status 永久忽略空白更改?
git reset --hard 也不起作用。
【问题讨论】:
标签: git whitespace removing-whitespace git-status