Fork someone else's project, then the source project is updated, I want to synchronize updates to the project I fork, how to do?
Method One:
1. Create a new library upstream (name any): git remote add upstream https://github.com/username/reponame.git
the link address is the source project address of your fork project
2. Then fetch the code under upstream:git fetch upstream
3. Finally, you can merge the code on the upstream into your own branch: git merge upstream/master
if it's not the master branch, change it according to your own circumstances.
This method I was in the time of error, such as the next, still do not know how, to explore:
Method Two:
On the GitHub page I fork over the project, point pull request
Then swap the base fork with the head fork to see the source relative to my update.
Then pull, merge, OK.
Reference:
http://segmentfault.com/q/1010000002457936
http://www.zhihu.com/question/20393785
Translation:
Merge Mixed Phase Solution
Fetch FETCH to pick up
Remotes Remote
Items on GitHub Fork are updated again