这是当前状态:
On branch howard
Your branch is up-to-date with 'origin/howard'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
deleted: thing.scala
(and other changed files)
如果我执行git diff --cached
,它会显示thing.scala
的内容以及其他差异。
但是我只想查看已删除文件的内容。在 git 中如何实现?
以下尝试不起作用:
git show HEAD~1 thing.scala
git diff --cached thing.scala