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
What I tend to do is to use git ls-tree
just do:
git ls-tree -r |grep 'your filename'
# there will be output that shows a SHA1 of your file
git show ${SHA1 of your file} > 'your filename'
This will print all filenames matching your grep and gives SHA1 keys of the files in the commit.
Git show can be used on files outside of your branch as well.
using > from your shell to pipe the output into a file gives you the result you are looking for.