"Go" GitHub updates its own fork code

Source: Internet
Author: User

GitHub to update its own fork codetime 2014-03-02 23:25:55 Micmiu-Software development Original http://www.micmiu.com/software/build/github-fork-update/ThemeGitHubGit

There's a feature called Fork on GitHub that can copy someone's project to their account. This feature is convenient, but it has one drawback: when the source project is updated, the branch you fork will not be updated together and need to be updated manually.

To GitHub Users: Micmiu (account name), fork Project Sql-parser (Https://github.com/FoundationDB/sql-parser) as an example:

1, clone his own account Fork Branch

Clone https://GITHUB.COM/MICMIU/SQL-PARSER.GITCD sql-parser

2. Add remote original branch to local (can git remote -v view remote branch list with command)

$ git Remote-voriginhttps://github.com/micmiu/sql-parser.git (Fetch) Originhttps://github.com/micmiu/ Sql-parser.git (push) 

If there is no remote Origin branch, you need to add:

git remote add sql-parser_fdb https://github.com/foundationdb/sql-parser.git

View the list of confirmed remote branches:

Git Remote-voriginhttps://github.com/micmiu/sql-parser.git (Fetch) Originhttps://github.com/micmiu/ Sql-parser.git (push) Sql-parser_fdbhttps://github.com/foundationdb/sql-parser.git (Fetch) Sql-parser_fdbhttps ://github.com/foundationdb/sql-parser.git (push)   

3. Fetch the new version of the original source branch to local

git fetch sql-parser_fdb

4, merge two versions of the code

git merge Sql-parser_fdb/master

5. Submit the latest code to GitHub's own (MICMIU) account

Push Origin Master

————— –eof @Michael Sun ————— –

"Go" GitHub updates its own fork code

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.