Git: Picking which diffs to stage

git add typically stages files on a file-by-file basis, but you can stage single diff pieces (hunks) of a file with the --patch (or -p) option to git add.

It will open an interactive console application to let you pick which hunks to stage.

Explained in more detail here: http://nuclearsquid.com/writings/git-add/


Next Post: Android App Idea: Simple, Subway-Friendly Commute Timer

Previous Post: Oh dear