5

I sometimes want to undo a commit without losing the changes, but just placing them back into an uncommitted and unstaged state. To do that at the cli, I do just git reset <sha-of-previous-commit>.

How would I do the same in magit?

1 Answer 1

7

Use x or X s to do so.

Using the X prefix has the benefit that it shows you all the available git reset variants.

This is also documented in the Resetting section of the manual.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.