
原文地址:github上fork了别人的项目后,再同步更新别人的提交
我从github网站和用git命令两种方式说一下。
github网站上操作
- 打开自己的仓库,进入code下面。
- 点击new pull request创建。
- 选择base fork
- 选择head fork
- 点击Create pull request,并填写创建信息。
6. 点击Merge pull request 合并从源fork来的代码。
7. 完成。
用git命令操作
- 用
git remote
查看远程主机状态
git remote -v
git remote add upstream git@github.com:xxx/xxx.git
git fetch upstream
git merge upstream/master
git push
- 1
- 2
- 3
- 4
- 5