Multi-user Github Pull Requests

前端 未结 6 2043
深忆病人
深忆病人 2020-12-25 11:48

Is it possible to amend a pull request that someone else has started?

Assume I maintain project X, and User A has sent me a pull request. There\'s some things I wan

6条回答
  •  时光取名叫无心
    2020-12-25 12:50

    You can do it like this:

    In your repo,

    git checkout -b new-branch
    

    Then pull User A's commits into your new-branch:

    git pull git://github.com/[User A]/[project-name].git
    

    After that, you can change it whatever you like in the new-branch. And when you test and satisfy with your changes, you can merge it into your master branch:

    git checkout master
    git merge new-branch
    

    OK, now you have your code with User A and your changes.

提交回复
热议问题