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