如何更改提交编辑器中显示的内容?

问题描述 投票:1回答:1

当我键入git commit file.c时,vim用类似的符号打开


# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# Explicit paths specified without -i or -o; assuming --only paths...
# On branch work                      <- From here ->
# Changes to be committed:
#       modified:   file.c
#
# Untracked files:
#       job.sh                        <- To here ->

我可以说出我引用的部分类似于git status的输出。如何更改?我希望它显示git diff file.c。能做到吗如果是,怎么办?

谢谢

git git-commit
1个回答
3
投票

运行git commit -v。选项-v|--verbose正是这样做的。

如果您总是想看差异配置您的存储库(或全局):

-v|--verbose
© www.soinside.com 2019 - 2024. All rights reserved.