git commit - 如何查看提交时所做的更改

时间:2012-09-20 15:20:01

标签: git diff commit

我可以设置git在进行交互式提交时向我显示差异(即没有-m“msg”)

这会让我看到我正在做出的改变。

1 个答案:

答案 0 :(得分:6)

尝试git commit -v

正如git-commit手册页中所述:

   -v , --verbose
          Show unified diff between the HEAD commit and what would be
          committed at the bottom of the commit message template. Note
          that this diff output doesn’t have its lines prefixed with #.