From: Bert Wesarg <bert.wesarg@googlemail.com>
To: Graeme Geldenhuys <graemeg.lists@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: staging specific lines out of a hunk for a commit
Date: Tue, 21 Sep 2010 12:52:38 +0200 [thread overview]
Message-ID: <AANLkTim=FQyBHcaHEX92YLgODrvpesuA7e4xwXuWcFg4@mail.gmail.com> (raw)
In-Reply-To: <AANLkTin4U78N_8LV8fCWuinNH9AFeOsRBjnvHM0qt2ZH@mail.gmail.com>
Hi,
On Tue, Sep 21, 2010 at 12:40, Graeme Geldenhuys
<graemeg.lists@gmail.com> 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 -
next prev parent reply other threads:[~2010-09-21 10:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-21 10:40 staging specific lines out of a hunk for a commit Graeme Geldenhuys
2010-09-21 10:52 ` Bert Wesarg [this message]
2010-09-21 11:00 ` Graeme Geldenhuys
2010-09-21 11:31 ` Matthieu Moy
2010-09-21 11:44 ` Graeme Geldenhuys
2010-09-21 11:09 ` Jonathan del Strother
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTim=FQyBHcaHEX92YLgODrvpesuA7e4xwXuWcFg4@mail.gmail.com' \
--to=bert.wesarg@googlemail.com \
--cc=git@vger.kernel.org \
--cc=graemeg.lists@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).