There is no concept of a "verbose commit" in git. The -v
option makes the process of committing more verbose, in that it shows the diff in the editor where you're prompted to enter a commit message; but because you give the -m
flag, that step is skipped.
I assume you're thinking that the diff is actually saved as part of the commit message, and that this is what makes the commit "verbose"? Generally it's not. If you fool git by removing all the comment lines that appear after where you're meant to type a message (but before the diff) then it will save the diff as the commit message.
I suppose you could do something like
git commit -m"$(git diff --staged)"
But the real question is: why do you want to do that? If you want to see a log of commits with their patches, use git log -p
. Duplicating the diff in the commit message only serves to annoy people who want to see meaningful commit messages.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…