In this case it might be better to use an interactive rebase.
To apply d4fd8cad..HEAD from branch develop to master, you can use the following command.
Make sure we are standing in develop:
git checkout develop
Branch out of develop:
git checkout -b develop-rebase
Do an interactive rebase on master. The -p option lets you keep the merge commits.
git rebase master -i -p
Delete all the lines with commits before d4fd8cad. Leaving you with the commits you wanted to cherrypick.
Save the rebase file.
Resolve conflicts, if any.
Now you have a branch that look exactly like you want your master branch to look. Take a look in gitk
to verify if you want.
Now all we have to do is merge this into master. If this is not a fast-forward merge, something wrong has probably happened, so let's add the --ff-only flag
git checkout master
git merge develop-rebase --ff-only