[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?