How to synchronize with the original warehouse after the GitHub is Fork (ii) __github

Source: Internet
Author: User
We have previously in the "GitHub fork after how to sync with the original warehouse," this blog details how to sync with the original warehouse project issues, look at the actual operation of the process or slightly cumbersome, in fact, there is a more convenient than the previous blog to optimize the method, so that we realize the function.
First three steps, please refer directly to "GitHub fork after how to sync with the original warehouse" (1) (2) (3). The operation is exactly the same. Then execute the following command directly:
Git pull upstream Master
That is, directly from the original warehouse master branch to pull the substitution code and directly merge the code, which pull=fetch+merge. So the original two-step operation here we are directly merged into one step operation, the logic is simpler.
After completing the above steps, the local warehouse has been synchronized with the original warehouse, then the local changes need to be synchronized to their GitHub warehouse to execute the following command:
Git push Origin Master
That is, the modification of the local master branch is pushed to the master branch of GitHub.       After the steps above, your own GitHub fork warehouse has been synchronized with the original project. The above operation is not limited to the master branch, you can switch any branch:
Switch to local branch:
git checkout local branch name

To check out a remote branch:
git checkout local branch name origin/remote Branch Name

Related Article

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.