It should just be:
(它应该只是:)
git diff --cached
--cached
means show the changes in the cache/index (ie staged changes) against the current HEAD
.
(--cached
表示针对当前HEAD
显示缓存/索引(即分阶段更改)中的更改。)
--staged
is a synonym for --cached
. (--staged
是--cached
的同义词。)
--staged
and --cached
does not point to HEAD
, just difference with respect to HEAD
.
(--staged
和--cached
不指向HEAD
,只是与HEAD
有所不同。)
If you cherry pick what to commit using git add --patch
(or git add -p
), --staged
will return what is staged. (如果您使用git add --patch
(或git add -p
)来挑选提交内容,则--staged
将返回正在--staged
内容。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…