git:在提交消息中显示索引差异作为注释 [英] git: Show index diff in commit message as comment
本文介绍了git:在提交消息中显示索引差异作为注释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当git commit 打开邮件编辑器时,显示一个简短的状态。 > #请为您的更改输入提交消息。用'#'开始
#的行将被忽略,并且一个空的消息将中止提交。
#分支大师
#您的分支在26次提交之前领先于origin / master。
#
#要提交的更改:
#(使用git reset HEAD< file> ...停用)
#
#修改:展示/src/com/gigantt/BorderArea.mxml
#modified:Showcase / src / com / gigantt / Client.mxml
#modified:Showcase / src / com / gigantt / GraphItem.mxml
#
我怎样才能调整git以显示差异提交?
我知道它可能是一个很长的差异,但仍然......非常有用。
解决方案
code> - verbose (或 -v
)flag for git commit
会显示提交内容的差异:
git commit --verbose
When git commit
open the message editor is shows a brief status, something like this:
# 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
#
How can I tweak git to show also the diff to be committed? I'm aware that it may be a long diff, but still.. so useful.
解决方案
The --verbose
(or -v
) flag for git commit
will display the diff of what would be committed:
git commit --verbose
这篇关于git:在提交消息中显示索引差异作为注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文