News for hackers. Stuff that matters.
Re:Writing good commit messages by bobz on Friday July 20, 2012 @12:14PM (#4271448)
Wow, just learned git add -p

That is fantastically useful.

*(Walks you through "hunks" (finer granularity than files) and asks if you want to stage them.)

Re:Writing good commit messages by zxoq on Friday July 20, 2012 @01:25PM (#4271855)
While useful, it's very dangerous in that it's serendipitous to make a commit that breaks building the project, which in the future will break building the project when checking out old commits, or introduce some subtle bug, which breaks other tools like bisect.

Just a personal preference, but I strongly prefer being able to build (and test) every commit in the entire history.

Re:Writing good commit messages by xyzzyb on Friday July 20, 2012 @01:39PM (#4271921)
So after you're done, go back through the commits and run your build tests.

https://www.destroyallsoftware.com/screencasts/catalog/sourc...

Re:Writing good commit messages by js2 on Friday July 20, 2012 @02:08PM (#4272098)

  git add -p
  git commmit
  git stash
  build && test
  git stash pop
  rinse && wash && repeat