Writing a commit message from memory is how you end up with “fix stuff”. I’d rather see what I’m committing while I type, and git can put it right there in the editor.
git commit -v
With -v (or --verbose) git adds the diff between HEAD and what you staged at the bottom of the commit message template. You scroll down, read what changed, and write the message above it. The diff isn’t part of the message: git leaves it out of the commit when you save and close the editor.
Give it twice and you also see the changes you didn’t stage yet in tracked files. That’s a nice way to catch the edit you meant to include and forgot to git add:
git commit -vv
I’d make it the default, because there’s no real reason to write a message blind:
git config --global commit.verbose true
commit.verbose also takes a number, so setting it to 2 gives you the -vv view every time.
One caveat: it only helps when git opens an editor. With git commit -m "..." there’s no template, so there’s nothing to look at. And on a big commit the file in your editor gets long, so jump to the top before you start typing, because the message goes above the diff, not below it.
Further reading: git-commit documentation, git-config documentation
Going deeper: Guide: advanced tmux, a config that grows with you, formats, layouts and more