Reputation: 36391
I have forked a repo on Github, another guy forked it too
I want to merge other-guy's branch into my branch
How can I do it?
Upvotes: 3
Views: 457
Reputation: 7064
I suppose you have the following Github repositories:
If you worked on your fork, you have a local clone clone of your own fork:
git clone [email protected]:you/yourfork.git
In order to work with the origin project (and the other fork), you have to add the corresponding remotes:
git remote add upstream http://www.github.com/mainuser/mainrepo.git
git remote add fork http://www.github.com/other/anotherfork.git
With theses remotes, you can get the remote information by fetching:
git fetch upstream
git fetch fork
Finally, you can merge the work with yours:
git merge fork/branch_you_want_to_merge
Upvotes: 8
Reputation: 80265
You probably mean branch
rather than fork.
git checkout your-branch
git merge other-guys-branch
Upvotes: 1