1 github官网平台操作
- 打开自己的仓库,进入code
- 点击Pull request创建
![](https://img.laitimes.com/img/__Qf2AjLwojIjJCLyojI0JCLicmbw5iNjdzMhV2N2EjYxgjYmZTOmFmZ0QGN3gDMyUDNyETMh9CX5d2bs92Yl1iclB3bsVmdlR2LcNWaw9CXt92Yu4GZjlGbh5yYjV3Lc9CX6MHc0RHaiojIsJye.png)
选择base repository,选择head repository,点击Create pull request
填写创建信息。
点击Merge pull request 合并从源fork来的代码。
2 git命令行操作
确定是否建立主repo远程源
git remote -v
如果里面只能看到你自己的两个源(fetch 和 push),那就需要
添加主repo的源
git remote add upstream URL git remote -v
然后你就能看到upstream了。
因为我这里已经有了,所以直接下一步操作
与主repo合并
git fetch upstream git merge upstream/master