I have made a shallow clone (fork) of a GitHub repository A into my own repository B. Thus there is no commit history for B. However there is an unmerged (open) pull request X in repo A, that I would like to add to B, and still have it show up as a proper merged pull request, but without the addition of extra branches and added commit history. (X is based on a particular commit Y in repo C on branch Z.)
How do you do this with git from CLI?
Given the seeming equivalence of merging a pull-request (from A) and picking a commit (from C), I guess there should be several different way to accomplish the same.
I've looked at many similar questions, but they don't quite address the issue, since they often involve first fetching all commits in various ways, or are incomplete. I've looked at: