简体   繁体   中英

How to create two pull request from one fork in github

I have forked my repo from master branch and commited few changes and created one pull request. Now that pull request is not merged. Meanwhile i need to do some other changes and need to create one more pull request.

So to this this is what i have done.

  1. cloned same forked again
  2. Create new branch

    git checkout -b TPR-4356-DMS

  3. created upstream like this git remote add upstream http master main url from where i have forked

  4. Then added my changes commited and pushed 4.I can see my changes in my branch but when i create pull request i can see my older commits as well.

Please suggest what i am missing here? Am i creating upstream correctly?

Check if your second branch was not created on top of the first one. You can view this with this command:

git log --graph --pretty=oneline --abbrev-commit

It will show to you a tree of your branches.

Here is the steps

git checkout -b TPR-4356-DMS
git remote add upstream yourmaster repo
git fetch upstream
git reset --hard upstream/master
git push origin TPR-4356-DMS:TPR-4356-DMS

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM