可能重复:
我如何显示已上演的更改?
有没有一种简单的方法来查看我在 git 中待处理的分阶段更改的差异?我已经上演了几个文件,但想在按下按钮之前最后看一下我正在提交的内容。我还有其他几个未暂存的更改,我想在单独的提交中进行,因此取消暂存,执行git diff
,然后分页到我想要的文件并不是一个理想的选择。
例子:
$ git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: foo.java
#
# Changed but not updated:
# (use "git add/rm <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: bar.java
# modified: baz.java
# modified: qux.java
我真的只是想看看我改变了什么,foo.java
而不必取消舞台。