13

Inside the magit log history, I can see the list of commits. How do I roll back to a specific commit from the list?

I can move to that commit and use d to see the diff/change of that commit, but I do not know how to check it out.

1
  • You probably want to read about the git reset command (and especially the difference between a hard and a soft reset). Magit binds x to a soft reset, and C-u x to a hard reset.
    – phils
    Dec 7, 2015 at 6:16

1 Answer 1

14

I like to do this with bb. You'll be prompted for a branch with completion, and the current element (e.g. navigate to it with ll) will be the default. Then simply press RET to check out that commit. It's also possible to paste a commit hash during the bb input.

1
  • 1
    Bearing in mind that while the title says "checkout", the question text actually says "rollback".
    – phils
    Dec 7, 2015 at 22:45

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.