How does git update code in merge github forked repository?

Source: Internet
Author: User

How does git update code in merge github forked repository?

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

The problem is that there is a ruby-gmail project in github. I need to get some Bug Fix code from another repository in the same project of fork.
Link1: https://github.com/dcparker/ruby-gmail (original author dcparker repository)
Link2: https://github.com/jihao/ruby-gmail (I'm from link1 fork repository)
Link3: https://github.com/geoffyoungs/ruby-gmail (geoffyoungs repository from link1 fork, and then he modified some bugs, but was not merge back to the original author of link1 repository)

After git clone repository to the local machine, I found that link3 has the code I want. I want to change the merge on link3 to my repository to avoid having to change the same bug.

How does git update merge github forked repository?
The specific method is the following three steps. I haven't used git to do this before. It's actually quite simple after knowing it.
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://jihao@github.com/jihao/ruby-gmail.git (fetch)
origin http://jihao@github.com/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

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.