I need to apply changes introduced in one branch to another branch. I can use cherry pick to do that. However, in my case I want to apply changes which are relevant only for
git reset HEAD~1
moves the files into pre-commit stage
git stash
removes from memory
Now your branch is pretty clean (reverted to previous commit)
This is what are you looking for:
git checkout target-branch sha1 path/to/file
sha1 is optional
Git has everything ready :)
Just use
git checkout <sha> <path-to-file>