How to update my new branch in a forked github repo

雨燕双飞 提交于 2019-12-03 17:16:56
VonC

How do I sync from upstream to my new branch instead of master?

You are supposed to sync master first, then rebase your branch on top of the newly updated master.

git pull upstream master
git checkout yourBranch
git rebase master
git push -f origin yourBranch

That supposes you have a remote named 'upstream' referring to the url of the original repo (that you have forked)

See "Pull new updates from original Github repository into forked Github repository" for the "git remote add upstream" command example.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!