I own a repository on GitHub to which someone sent a pull request with one single commit. I only want to implement his solution partially, and use about half of the code changes the user made. What should I do in this situation?
Make a branch of his version, then go back and copy and paste the "old" code that I want to preserve from the original version into a second commit. This may make the diff between commits look larger than it really is, and throw off things like
Copy and paste the code I want to keep from his commit into a new, different commit. This means that he does not receive credit for his valuable contribution to the code.
Same as the above, copy some of his code into a new commit, but change the author of the commit to him instead of me. He technically didn't write the exact code that was committed, so I'm not sure if this is frowned upon. But at least he gets attribution for those lines that are used.