Philip Newton (pne) wrote,
Philip Newton
pne

  • Mood:

`git add -i` FTW

Today, 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!

Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments