Thursday, 20 May 2010

`git add -i` FTW

Thursday, 20 May 2010 17:18
pne: A picture of a plush toy, halfway between a duck and a platypus, with a green body and a yellow bill and feet. (Default)

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!

Profile

pne: A picture of a plush toy, halfway between a duck and a platypus, with a green body and a yellow bill and feet. (Default)
Philip Newton

June 2015

S M T W T F S
 12 3456
78910111213
14151617181920
2122232425 2627
282930    

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Sunday, 6 July 2025 07:15
Powered by Dreamwidth Studios