3 ms·
> Look at the comments telling you which files have been changed. And you can make this even better by adding the diff that’s being committed with verbose mode
by chrismorgan 4y ago
> Look at the comments telling you which files have been changed.
And you can make this even better by adding the diff that’s being committed with verbose mode (see `git commit --help`), so that you can scroll down and easily see exactly what’s going into the commit:
git commit --verbose
You can make it permanent so:
git config --global commit.verbose 1
I also recommend setting commit.cleanup = scissors as a related thing.
- bityard 4y agoThanks for this tip. One of the things I always did in larger commits was compose the commit message in a separate text editor while reviewing the diff in my terminal. This puts the diff right where I can see it, although time will tell if I enjoy scrolling up and down to switch between reading the diff and editing the commit message.
- chrismorgan 4y agoSee if your editor supports a split view; in Vim, for example, you have :split or :vsplit.