GitHub中从fork他人repo并最终要求合并到原项目的过称:
1、在github上点击fork按钮,此项目在你的repo中出现。
2、git clone (http或ssh协议),将此项目代码克隆到本地。这样就可以在本地进行代码的修改。3、克隆到本地后,它默认的remote是你fork到你自己github上的repo(称为origin),而不是the repo you forked from.为了跟踪这个the repo you forked from,你需要cd 到你clone 到本地的repo文件夹下进行:
git remote add upstream http::(或是ssh),建立一个叫upstream(名字可以随便设)的remote.
4、若你fork的repo已经改变,使用:
git fetch upstream //fetch any changes fron the original reposity
git merge upstream/master //merge any changes fetched into your working files
或者直接用: