I am trying to apply changes I stashed earlier with git stash pop
and get the message:
Cannot apply to a dirty working tree, please stage your c
You can do this without having to stash your current changes by exporting the stash you want as a patch file and manually applying it.
For example, say you want to apply stash@{0} to a dirty tree:
Export stash@{0} as a patch:
git stash show -p stash@{0} > Stash0.patch
Manually apply the changes:
git apply Stash0.patch
If the second step fails, you will have to edit the Stash0.patch file to fix any errors and then try git apply again.