From: Bert Wesarg Date: Tue, 21 Sep 2010 10:52:38 GMT Subject: Re: staging specific lines out of a hunk for a commit Message-ID: In-Reply-To: Hi, On Tue, Sep 21, 2010 at 12:40, Graeme Geldenhuys wrote: > Hi, > > I know 'git gui' has this cool feature where you can stage one line at > a time. This is really handy, but also very annoying, if you have a > large piece of code you want to commit. > > eg: I have a single hunk, which can't be split into smaller hunks > because it is all new code. But that hunk fixes a few bugs, or > introduces a few new features. > > Is there a way to use 'git add -i' or 'git add -p' or 'git gui' and > tell it to add for example lines 5-20 of the hunk to the index? > Currently with 'git gui', I have to right click and select 'Stage line > for commit' 15+ times! :-( Just select the lines you would like to add, and than you can stage them at once. > > I'm using git-gui 0.12.0.64 and git version 1.7.0.4. But I don't know since when this feature is available. Bert > > -- > Regards, >   - Graeme -