git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Benoit SIGOURE <tsuna@lrde.epita.fr>
Cc: Pascal Obry <pascal.obry@wanadoo.fr>, git list <git@vger.kernel.org>
Subject: Re: How to remove a specific hunk
Date: Fri, 26 Oct 2007 19:19:32 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0710261917270.4362@racer.site> (raw)
In-Reply-To: <2669F76D-6FF2-4CCF-9337-639D84EE65E8@lrde.epita.fr>

Hi,

On Fri, 26 Oct 2007, Benoit SIGOURE wrote:

> On Oct 26, 2007, at 5:38 PM, Pascal Obry wrote:
> 
> > Andreas,
> > 
> > > Once you've added the other two hunks, they'll no longer show up in
> > > git-diff, so you can do something like this:
> > > 
> > > $ git-add -i; # add the other two hunks to commit
> > > $ git-diff > middle-hunk.patch
> > > $ git-apply -R middle-hunk.patch
> > > test, test, test
> > > $ git-apply middle-hunk.patch
> > 
> > Thanks, this will clearly work. I was expecting something more
> > integrated like a "git reset --interactive" or something like that :)
> 
> That'd be great!  :)

I skipped over the beginnings of this thread because of time constraints, 
but would "git reset HEAD^ && git add -i" not helped you?  git add -i 
allows you to stage hunks, so by just _not_ staging _that_ hunk but 
everything else, should have worked for you, right?

There's also git-gui which does all that graphically for you (remember the 
right mouse button).

Ciao,
Dscho

  reply	other threads:[~2007-10-26 18:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-26 15:10 How to remove a specific hunk Pascal Obry
2007-10-26 15:28 ` Andreas Ericsson
2007-10-26 15:38   ` Pascal Obry
2007-10-26 17:03     ` Benoit SIGOURE
2007-10-26 18:19       ` Johannes Schindelin [this message]
2007-10-26 21:59     ` Olivier Ramonat
2007-10-26 16:42   ` Jeff King
2007-10-26 16:49     ` Jeff King
2007-10-29  7:03       ` Miles Bader
2007-10-26 19:20 ` Alex Riesen
2007-10-31 10:10   ` Benoit SIGOURE
2007-10-31 11:06     ` Johannes Schindelin
2007-10-31 11:56       ` Florian Weimer
2007-10-31 12:24         ` Pascal Obry
2007-10-31 12:00       ` Peter Baumann

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=Pine.LNX.4.64.0710261917270.4362@racer.site \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=pascal.obry@wanadoo.fr \
    --cc=tsuna@lrde.epita.fr \
    /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).