如何提交pr
#Git
2024-01-08
原文是大二时写的,但是找不到了,于是重新写了一篇。默认是有 git 经验的,没有的话可以看看这篇文章 Git信息泄露
流程
- issue
可以先提一个 issue 与原作者交流

- Fork 仓库
Fork 需要提交 pr 的仓库到自己的仓库中。

- git clone 到本地
git clone 的是刚刚 Fork 的仓库,不是原始项目的仓库。
1 |
|
- 创建一个分支
1 |
|

- 做出修改
做出你需要的修改。
- 提交修改
由于分支是在本地创建的,git push 需要加上 --set-upstream
1 |
|

- 创建 pull request
在 Fork 的仓库中,点击 Compare & pull request
选择你想并入的原项目分支,标题和描述信息。如果有对应的
issue,就通过键入 #
添加(Github 会自动展示 issues 列表)

点击 Create pull request
,就行了。结果如下:
