No, there doesn't exist a direct way. Though; you can select the files from branch you want to merge and overwrite them over existing ones in master branch. The commands in order shall be:
git checkout master
git show bugfix:login.php > login.php
git show bugfix:register.php > register.php
git add .
git commit -m "Select login and register from branch/bugfix"
Ok, the above method will "destroy" file history. There is an old discussion about the same in this mailing list.
From a technical standpoint, the thing that makes history matter (and
why "set of commits in date order" is useless) is because it gives us
a COMMON ANCESTOR! And that is the only thing that matters.
Now, what is fundamentally wrong with doing per-file history?
Now, if you've followed this argument, you should go "Aaahh!
Obvious!".
Ignoring a whole lot of paragraphs; you'll find the workaround:
git diff commit..othercommit filename | git-apply --index && git commit
In your case, commit
= hash of you HEAD/master branch; and othercommit
= hash of bugfix branch.