I've made a series of commits in my branch. However, the last 3 or so were mistakes - I want to 'revert' my branch to a previous commit.
Googling the issue I understand I must use git log
to get the ID of the commit I want to return to, then git checkout <id>
. But I cannot find information beyond that.
It seems when I checkout I am no longer within my original branch. How do I merge back into my original branch, thus undoing the changes in the previous erroneous commits?