Reputation: 3826
I forked project created branch made some changes on it and created pull request. Repo owner added some minor changes to master. I need to pull this changes from original project master to my fork branch.
I tried
git fetch origin
but nothing happens.
Upvotes: 1
Views: 1361
Reputation: 95958
If you try git remote -v
you'll notice that origin
points to your fork and not to the original repository.
In order to get changes from the original one, you should add a new remote:
git remote add upstream <URL>
and then pull changes from that remote:
git fetch upstream
Now if you show the remotes again, you should have something like:
$ git remote -v
origin https://github.com/... (fetch)
origin https://github.com/... (push)
upstream https://github.com/... (fetch)
upstream https://github.com/... (push)
Note that the name upstream
is not special, you can set it to whatever you want.
Upvotes: 3