Hacker News new | past | comments | ask | show | jobs | submit login

> 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.



Thanks 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.


See if your editor supports a split view; in Vim, for example, you have :split or :vsplit.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: