Git merge from someone else's fork

后端 未结 1 1415
一向
一向 2020-12-12 18:28

I have a repository on github, and someone else has forked it and made changes.

I want to:

  1. Create a new branch
  2. Merge their changes into my bra
相关标签:
1条回答
  • 2020-12-12 18:46

    Add their github fork repo as a remote to a clone of your own repo:

    git remote add other-guys-repo <url to other guys repo>
    

    Get their changes:

    git fetch other-guys-repo
    

    Checkout the branch where you want to merge:

    git checkout my_new_branch
    

    Merge their changes in (assuming they did their work on the master branch):

    git merge other-guys-repo/master
    

    Resolve conflicts, commit the resolutions and voila.

    0 讨论(0)
提交回复
热议问题