Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
223 views
in Technique[技术] by (71.8m points)

`git commit -v` by default

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...