Send a pull request on GitHub for only latest commit

后端 未结 7 1497
一整个雨季
一整个雨季 2020-11-29 14:45

I forked a project on github and am successfully making changes to my local master and pushing to origin on github. I want to send a pull request, but only want to include t

7条回答
  •  误落风尘
    2020-11-29 15:09

    You need to basically create a new branch & cherry-pick the commits you want to add to it.

    Note: you might need these before the checkout/cherry-pick commands

    git remote add upstream

    git remote update

    git checkout -b  upstream/master
    
    git cherry-pick 
    
    git push origin 
    

    Afterwards, you will see branch on github, switch to it and can submit the pull request with the changes you want.

提交回复
热议问题