title: How to revert the second to last commit but not the last commit?
body: <p>Say I have four commits <code>A--&gt;B--&gt;C--&gt;D</code> but C was terribly misguided. How can I undo C without losing the changes from D? I understand the basic functionality of <a href="https://git-scm.com/docs/git-revert" rel="noreferrer">git-revert</a> and <a href="https://stackoverflow.com/a/927386/5937428">undoing commits</a>, but I can't figure out how (if it is even possible) to undo a specific commit (not the latest) without having to redo the changes that came after it.</p>