Search code examples
gitgithubgitkraken

Forked a repo after submitting pull requests but before they were accepted


  1. I submitted two pull requests to a documentation repo (I will call it Repo-A). [Note: All changes are made directly to the master branch for Repo-A; the git-flow methodology is not used.]
  2. The pull requests are currently outstanding at Repo-A (not accepted, not rejected; just waiting for attention from owner of Repo-A).
  3. I forked Repo-A, so now I have MyRepo-B.
  4. At GitHub, Repo-A is shown as having two open pull requests.
  5. At GitHub, MyRepo-B is shown as having no open pull requests. Instead, I see the two pull requests shown as patch-1 and patch-2 in the GitKraken UI:

enter image description here

My question: How can I merge the two patches to the master branch on MyRepo-B?

(PS: I don't care about what happens on Repo-A.)


Solution

  • From the command line:

    git checkout master 
    git merge patch-1
    git merge patch-2
    git commit -am "merge patch 1 and 2 branches into master"
    git push -u
    

    From the GitKraken client, you can use the GitKraken Merge Tool,

    https://support.gitkraken.com/working-with-repositories/branching-and-merging