git commit 打开消息编辑器时,会显示一个简短的状态,如下所示:

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
# Your branch is ahead of 'origin/master' by 26 commits.
#
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#   modified:   Showcase/src/com/gigantt/BorderArea.mxml
#   modified:   Showcase/src/com/gigantt/Client.mxml
#   modified:   Showcase/src/com/gigantt/GraphItem.mxml
#

如何调整 git 以显示要提交的差异?
我知道这可能是一个很长的差异,但仍然......非常有用。

最佳答案

--verbose -v (或 git commit )标志将显示提交内容的差异:
git commit --verbose

关于git:将提交消息中的索引差异显示为注释,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/4750148/

10-14 18:55