I always use git commit --verbose
. Is there an equivalent option/setting that will make git show me the diff when I'm rewording a commit message during git rebase --interactive
?
相关问题
- Why does recursive submodule update from github fa
- Extended message for commit via Visual Studio Code
- Emacs shell: save commit message
- Can I organize Git submodules in a flat hierarchy?
- Upload file > 25 MB on Github
相关文章
- 请教Git如何克隆本地库?
- GitHub:Enterprise post-receive hook
- Git Clone Fails: Server Certificate Verification F
- SSIS solution on GIT?
- Is there a version control system abstraction for
- ssh: Could not resolve hostname git: Name or servi
- Cannot commit changes with gitextensions
- git: retry if http request failed
According to your answers in the comments, executing
git diff HEAD^
will not help you, except you only want to rewored the last commit.But in this case a rebase is the wrong tool anyway. Instead you can simply do
git commit --amend --verbose
without changes in the index and then edit the commit message, having the diff view you are asking for.If you want to reword an older or multiple commit messages with having the diff view, just use the
edit
stanza instead of thereword
stanza and then usegit commit --amend --verbose
without code changes in the index on each of the commits.reword
should only be a shortcut for usingedit
and then dogit commit --amend -m "new message"
without any changes which will only change the commit message.You can also define
git commit --amend --verbose
orgit commit --verbose
as alias so you save some typing and can e. g. simply dogit cav
orgit c --amend
.