步驟
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.
這就說明你的倉庫和原作者的倉庫保持一致了。