How does git merge the code updates in GitHub forked repository?

Source: Internet
Author: User
Tags git clone repository

[Refer to]http://www.haojii.com/2011/08/how-to-git-merge-from-forked-repository/]

The problem is, there's a project Ruby-gmail on GitHub, and I need to get some bug fix code from the other repository that fork from the same project
Link1:https://github.com/dcparker/ruby-gmail (former author Dcparker repository)
Link2:https://github.com/jihao/ruby-gmail (I fork from Link1 repository)
Link3:https://github.com/geoffyoungs/ruby-gmail (geoffyoungs from Link1 Fork Repository, and then he has some bug fixes, But did not merge back to the original author's Link1 repository)

After I git clone repository to the local, found that Link3 has the code I want, I want to merge Link3 on my repository, to avoid my efforts to change the same bug

How does git merge the updates in GitHub forked repository?
The specific approach is the following three steps, before the use of Git so, know that it is actually quite simple
1. >git remote add geoffyoungs http://github.com/geoffyoungs/ruby-gmail.git
2. >git fetch geoffyoungs
3. >git merge geoffyoungs/master

The local repository looks like this:
>git remote -v
geoffyoungs http://github.com/geoffyoungs/ruby-gmail.git (fetch)
geoffyoungs http://github.com/geoffyoungs/ruby-gmail.git (push)
origin http://[email protected]/jihao/ruby-gmail.git (fetch)
origin http://[email protected]/jihao/ruby-gmail.git (push)
>git branch -a
* master
remotes/geoffyoungs/gh-pages
remotes/geoffyoungs/master
remotes/origin/HEAD -> origin/master
remotes/origin/adimircolen-master
remotes/origin/gh-pages
remotes/origin/master

How does git merge the code updates in GitHub forked repository?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.