GIt保持远程 源仓库与Fork仓库同步--2017年6月13日

【1】添加远程仓库

git remote add remote [仓库地址]

【2】拉取远程仓库

git pull remote

【3】切换分支

git checkout newbranch

创建并切换分支

git checkout -b newbranch

【4】合并

git merge remote/newbranch

【5】推送到fork仓库

fork仓库不含新分支 git push origin newbranch

fork仓库含有新分支 git push origin newbranch:newbranch

原文地址:https://www.cnblogs.com/jingbostar/p/7001913.html