If I want to pick just a single file from a feature branch and merge it into master, and also if a true merge isn't important, I'll use git checkout. However, if there are new changes to the same file in master, then the checkout operation will overwrite those changes.
What I want git checkout to do is basically merge the file's changes instead of simply overwrite them (which seems contrary to its purpose, I know). It should basically do these steps:
git diff <sha1>..<sha2> > changes.patch
git apply changes.patch
Sure, I could create an alias to do this but I'm specifically interested in seeing if git checkout can do this for me.