When doing a regular git commit, git commit --verbose
shows the diff in the text editor when writing the commit message.
Suppose I am doing an interactive rebase (git rebase --interactive
) to edit previous commits. To 'continue' rebasing, I run git rebase --continue
. This opens a text editor for editing the commit message, but it does not show the diff. After making changes to a commit, how can I display the diff when (re)writing the commit message during an interactive rebase?
git rebase --continue --verbose
doesn't seem like a valid command...
In the middle of a rebase,
shows you the changes not yet added to the commit,
shows you the new changes you committed, and
shows you the original changes in the commit you're editting.
To show the diff:
To make all commits verbose without having to specify
-c commit.verbose=true
every time, add this to~/.gitconfig
:Reference:
man git-config
.You can do:
If you get tired copying that command you can create an alias in your
~/.gitconfig
:And now just do: