After seeing a presentation by Zach Holman about git and GitHub, I've been trying to improve my workflow in git.

One feature I've found to be very useful is the interactive patch selection, which lets you pick individual changes in a file and stage them.

This ensures that you can easily keep commits focused on a specific thing.

  1. Make sure all changes are unstaged
  2. Run git commit -p
  3. Select each 'hunk' you want to stage with y or n
    • you have a few options available here, but I usually only need y or n