Skip to contentSkip to conversation

Revert hunk?

DISCUSSION Steve Folly 3 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

git gui has an option to revert changes, but that applies to the whole file. Is there an option to revert a line or hunk rather than the whole file?

Thanks,
Steve

#1 lore raw

Am 01.05.2010 21:54, schrieb Steve Folly:

Quoted 3 lines

git gui has an option to revert changes, but that applies to the whole file. Is there an option to revert a line or hunk rather than the whole file?

Stage everything except that hunk or line, and then revert.

-- Hannes

#2 lore raw
In reply to Steve Folly
Quoted 3 lines · Steve Folly

git gui has an option to revert changes, but that applies to the whole file. Is there an option to revert a line or hunk rather than the whole file?

cola has the ability to stage/revert on a per line basis:

http://cola.tuxfamily.org/

Signature · 4 lines
   Uri

Please consider the environment before printing this message.
http://www.panda.org/how_you_can_help/