discard/revert changes by hunk?

43 views
Skip to first unread message

Gary Oberbrunner

unread,
Oct 29, 2014, 4:19:40 PM10/29/14
to ma...@googlegroups.com
Is there a way in magit to discard changes hunk-by-hunk, just like 's' and 'u' in the status buffer, but to discard/revert instead of stage?

I'm using the next branch, in case that's significant.

Alex Ott

unread,
Oct 29, 2014, 4:23:32 PM10/29/14
to Gary Oberbrunner, Magit
press 'k' ?

On Wed, Oct 29, 2014 at 9:19 PM, Gary Oberbrunner <ga...@oberbrunner.com> wrote:
Is there a way in magit to discard changes hunk-by-hunk, just like 's' and 'u' in the status buffer, but to discard/revert instead of stage?

I'm using the next branch, in case that's significant.

--
You received this message because you are subscribed to the Google Groups "magit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to magit+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
With best wishes,                    Alex Ott
http://alexott.net/
Twitter: alexott_en (English), alexott (Russian)
Skype: alex.ott

Jonas Bernoulli

unread,
Nov 1, 2014, 2:59:46 PM11/1/14
to Alex Ott, Gary Oberbrunner, Magit
>> just like 's' and 'u'
> press 'k' ?
The commands these keys are bound to are known as "apply variants".
They are implemented using Git commands, mostly `git apply' but as
porcelain commands at least some of them are actually unique to Magit.

I have described them in some more detail in a thread mostly concerning
interactive rebase. But that information is relevant when just working
on HEAD too. (Actually I explicitly separate "modifying HEAD" from
"making some commit the HEAD", so that interactive rebase becomes less
scary and isn't seen as "modal in a bad way").

Anyway, here's the link:
https://github.com/magit/magit/issues/966#issuecomment-60498587

Best regards,
Jonas


>
> On Wed, Oct 29, 2014 at 9:19 PM, Gary Oberbrunner <ga...@oberbrunner.com>
> wrote:
>
>> Is there a way in magit to discard changes hunk-by-hunk,
>>
Reply all
Reply to author
Forward
0 new messages