步骤
1、切到你要的分支:
git checkout branch_name
2、拉取upsteam(原作者仓库的别名)仓库的代码:
git fetch upstream
3、合并upsteam(原作者仓库的别名)仓库的代码到你的本地对应的分支:
git merge upstream/branch_name
4、推送你的本地代码到你自己的github对应的分支:
git push origin branch_name
如果成功的话,去你的github仓库对应的分支页面下会显示:
This branch is even with xxxxx:branch_name.
这就说明你的仓库和原作者的仓库保持一致了。