`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)
[personal profile] pne

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!

Date: Thursday, 20 May 2010 22:48 (UTC)
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
From: [personal profile] afuna
Oh yay! I love that feature in git and mercurial (well, in mercurial it's hg record, but same diff more or less!)

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 Saturday, 10 January 2026 08:36
Powered by Dreamwidth Studios