Re: How to remove a specific hunk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, 31 Oct 2007, Benoit SIGOURE wrote:

> On Oct 26, 2007, at 9:20 PM, Alex Riesen wrote:
> 
> > Pascal Obry, Fri, Oct 26, 2007 17:10:38 +0200:
> > > 
> > > I'm very new to Git... but start to love it :)
> > > 
> > > Before committing sometimes I want to remove a specific hunk. Say in
> > > file a.txt I have in the diff 3 hunks, I want to revert/delete/remove
> > > the second one. Is there a way to do that ?
> > 
> > Take a look at git-gui. Try right-clicking in the diff pane at the
> > bottom.
> 
> This only allows you to stage a given hunk, not to remove one.  Right 
> now I'm in a situation where I need to remove a specific hunk to compile 
> and it's sad that git-gui doesn't provide an option so that you can 
> right-click -> revert hunk.

You have seen that there are two different file lists, "staged changes" 
and "unstaged changes", right?  AFAIK if you click on the file in "staged 
changes", you can find the staged hunk and then remove it from the staged 
area.

"Revert hunk" would not make any sense, since the hunk disappears once you 
staged/unstaged it.

Ciao,
Dscho

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux