Let's say I have a commit history like this:
commit 1 - The first commit
commit 2 - The commit I want to revert, but keep the changes of
commit 3 - The third commit
commit 4 - The fourth commit
[uncommited work]
If I haven't pushed anything yet (or only up to commit 1), how can I delete commit 2, but apply the changes made in commit 2 to the currently uncommited work?
All I could find was about how to delete the commit and it's changes or reset to that commit, which would (as I understand) remove all commits afterwards from the history.