Re: How to remove a specific hunk
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Oct 26, 2007, 18:19 UTC
- Message-ID
- <Pine.LNX.4.64.0710261917270.4362@racer.site>
- In-Reply-To
- <2669F76D-6FF2-4CCF-9337-639D84EE65E8@lrde.epita.fr>
Hi,
On Fri, 26 Oct 2007, Benoit SIGOURE wrote:
Show 17 quoted lines
> 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