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.
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.
Sign up to join this communityI 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.
git reset
command (and especially the difference between a hard and a soft reset). Magit bindsx
to a soft reset, andC-u x
to a hard reset.