`git add -i` FTW
Thursday, 20 May 2010 17:18Today, I wanted to commit part of a changed file but not the rest.
Thank goodness I’m using git locally rather than Subversion or SourceSafe, because it actually lets me do that—with git add -i
(interactive add mode), I can choose to add only certain patch “hunks” of a file to the index (the staging area containing data to be committed).
Took me a bit of doc-reading to figure out how, but I got it to work in the end.
Yay!