The following solution is adopted from a blog post
It turned out that checkout can also be helpful in this matter. You can simply callout (checkout) those specific files from another branch:
# switch to the branch you want to be your merge destination
git checkout master
# checkout specific files from specific branch (e.g bugfix)
# format: git checkout ...
git checkout bugfix login.php register.php
# check the status
git status
# merge them in
git commit -m "your merge comment"
Approach 02
This is an easy alternative approach, but it only works if you have one commit per file (meaning every time you have changed a file, you have made one commit and then have moved to the next file). In this case you can simply bring those specific commits to the other branch (in your case the master branch):
# get which commit you want to take to the other branch (first 7 characters will do)
git log
# switch to the branch you want to be your merge destination
git checkout master
# bring specific commit to this branch (replace the 63344f2 with your own 7 character commit ID)
git cherry-pick 63344f2