Magit: Can I reverse a hunk from a previous commit?
Asked Answered
I

1

6

If i'm looking at the log messages and select one specific commit to view the diff is it possible to revert (or reverse appply) a specific hunk of that commit? I know there is a revert commit option but i'm only interested in one small part of it.

Thanks in advance.

Illustrate answered 20/3, 2018 at 9:5 Comment(0)
B
5

Yes, and it's the same key-binding whether it's a commit, a file, a hunk, or a marked region. Just type v with the thing in question highlighted, and Magit will prompt you accordingly.

Badenpowell answered 20/3, 2018 at 9:49 Comment(2)
it is magit-revert for those with non default bindings ;)Sarina
@Sarina Actually, it is magit-reverse and not magit-revert.Barbra

© 2022 - 2024 — McMap. All rights reserved.