I've recently come across this answer on SO. It provides a recipe on how to reverse changes made by applied stash but preserve other changes to files. I've tried going through the script provided as an example but my patch failed:
Checking patch messages...
error: while searching for:
Hello, world
Hello again
error: patch failed: messages:1
I've noticed that the answer is of 2009, is this approach valid today? What I'm also curios about is that AFAIK when git applies a patch is searches for context lines before and after the change, but in the example in the question the context after the change won't match, how's then a patch supposed to be applied?