# How to "revert hunk" in git gui?

1 messages from 2010-09-02 to 2010-09-02. Participants: Stefan Haller.
Thread: https://gitlist.dev/t/24951

## Stefan Haller, 2010-09-02 18:59

Subject: How to "revert hunk" in git gui?
Message-ID: <1jo7lrb.1oy1vn4mdqeedM%lists@haller-berlin.de>
URL: https://gitlist.dev/e/1jo7lrb.1oy1vn4mdqeedM%25lists%40haller-berlin.de

```
I always use git gui to make commits, and I like the way you can stage
and unstage hunks easily.

Often, when looking at the unstaged changes I come across some piece of
debug code that I forgot to delete, and I can't seem to find an easy way
to revert this hunk.  As a workaround, I can stage the entire file,
unstage the hunk I want to revert, and then choose "Revert changes" from
the Commit menu (which reverts just the unstaged hunks); but that's a
bit inconvenient.

I feel that this is such a common operation that I must be missing
something.

Thanks,
   Stefan


-- 
Stefan Haller
Berlin, Germany
http://www.haller-berlin.de/

```
