`git commit -v`默认情况下 [英] `git commit -v` by default

查看:122
本文介绍了`git commit -v`默认情况下的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何配置 git commit 充当 git commit -v (显示正在提交的完整差异)使用别名不太令人满意,因为它不会影响间接提交的操作期间的提交消息编辑,如 git 变基

解决方案

如果您使用的是git 2.9,可以使用配置完成。

  git config --global commit.verbose true 

Git 2.9.0发行说明:
https:/ /github.com/git/git/blob/v2.9.0/Documentation/RelNotes/2.9.0.txt


git commit学会了关注commit.verbose
配置变量,并像从命令行给出--verbose选项
一样。



How can I configure git commit to act as git commit -v (showing the full diff being committed) by default?

Using an alias is not quite satisfactory, as it does not affect commit message editing during operations which may indirectly commit, such as git rebase.

解决方案

If you are using git 2.9, this can be done with a config.

git config --global commit.verbose true

Git 2.9.0 Release Notes: https://github.com/git/git/blob/v2.9.0/Documentation/RelNotes/2.9.0.txt

"git commit" learned to pay attention to the "commit.verbose" configuration variable and act as if the "--verbose" option was given from the command line.

这篇关于`git commit -v`默认情况下的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆