Normally you fork the target project to which you wish to make the pull request, commit it in your fork, and request the upstream maintainer to merge your exact commit.
Then your exact commit (with the same byte for byte code changes and commit hash) gets added to the upstream repository, essentially wrapped in a "merge commit" by the maintainer. This preserves the integrity of the code change proposed by the original author.