I am new to git. I am facing a situation: A week ago, I forked master branch of some other user's repo on GitHub, added my project to that and my changes were merged successfully through a pull request.

I did not delete that forked branch from my github.

I checked out this forked repo on a different machine and added another project to that.
I raised a pull request to merge my changes.

But this new pull request shows commits of my first pull request as well.
Have I messed up something? Please help.

1 Answers

VonC On

On your new machine, make sure you add the original repo URL (the one which has merged your first PR)

git remote add upstream /url/origin/repo
git fetch upstream

Then create your second PR branch from the updated upstream master branch

git checkout -b second_PR upstream/master