git diff - 仅显示更改,不显示 "near" 更改

git diff - show only the changes, nothing "near" the change

我愿意

git diff

只显示差异,不显示 "near" 我的更改。

我该怎么做?

原来 git 文档没有使用 "near" 这个词。他们改用 "context",所以

git diff -U0

表示在差异周围显示 0 行上下文,如 git-diff 手册页所述:

-U, --unified= Generate diffs with lines of context instead of the usual three. Implies