Reprint Address: http://blog.csdn.net/do_it__/article/details/7836513 First, the premise
The premise of this article is that you've already forked someone else's branch on GitHub, and you've got an SSH connection to GitHub.
Related configuration details Reference: https://help.github.com
Second, detailed operation
- Check out the branch that you fork someone on GitHub to the Rrest directory, where the Rrest directory does not exist before.
git clone [email protected]:yss/rrestjs.git rrest
- Then add the remote branch (that is, the branch of the person you fork) to your local name Bob (this name is arbitrary).
Git remote add Bob Https://github.com/DoubleSpout/rrestjs.git
If you run the command: Git remote-v you'll find out more about a Bob's remote branch. As follows:Bob Https://github.com/DoubleSpout/rrestjs.git (FETCH) Bob Https://github.com/DoubleSpout/rrestjs.git (push) Origin [ Email protected]:yss/rrestjs.git (FETCH) origin [email protected]:yss/rrestjs.git (push)
- Then, pull each other's code to your local.
git fetch bob
- Finally, merge each other's code.
git merge Bob/master
- Finally, push the latest code to your github.
Git push Origin Master
This completes your own code update.
GitHub Update Fork's code