From git help commit :
«
-v, –verbose
Show unified diff between the HEAD commit and what would be committed at the bottom of the commit message template. Note that this diff output doesn’t have its lines prefixed with #.
»
That’s wonderful but i’d prefer having it in a vertical splited window.
This should do what you want:
The “^M” is the enter key (carriage return), entered by pressing Ctrl+V and then pressing enter.
The argument to the “-c” option tells vim to
Obviously you want this command to be invoked only when you run “git commit -v” and nowhere else because the vim command sequences applies only in that case so it might not be a good idea to set GIT_EDITOR as such.
A better configuration is use alias: