I have a master and a dev branch. I made commits in both. I also deleted some files in dev. I made other commit in master, so this master branch is more recent.
My i
You can run the merge without committing, make sure you have all of the correct files, and then run the commit.
Perform the merge
git checkout master
git merge --no-commit dev
Make the necessary changes, and fix merge conflicts (if any).
git rm my-files-to-delete
Commit the merge, finishing the process.
git commit