向github的开源项目提交PR的步骤
2018-01-11 16:38
295 查看
开源项目,顾名思义就是每个人都被欢迎,可以向这个项目贡献代码。
本文以向 https://github.com/kubernetes/kubernetes 提交PR为例,记录下提交PR,进行代码贡献的基本步骤。
注册账号并登陆 https://github.com 打开 https://github.com/kubernetes/kubernetes,点击右上角的Fork按钮。 Fork完成后,会在自己的账号下产生一个新的repo, 比如 https://github.com/lichen2013/kubernetes 在 fork 的 repo 页面,点击绿色 clone or download 的绿色按钮,展开获得 clone with SSh 的 路径,比如 git@github.com:lichen2013/kubernetes.git。
在 server 上执行以下 命令。
然后就可以在本地建立自己的branch进行代码开发了。
在完成代码开发后,向 github 提交代码:
打开 https://github.com/lichen2013/kubernetes/tree/my_branch,点击New pull request按钮创建新的PR。
本文以向 https://github.com/kubernetes/kubernetes 提交PR为例,记录下提交PR,进行代码贡献的基本步骤。
注册账号并登陆 https://github.com 打开 https://github.com/kubernetes/kubernetes,点击右上角的Fork按钮。 Fork完成后,会在自己的账号下产生一个新的repo, 比如 https://github.com/lichen2013/kubernetes 在 fork 的 repo 页面,点击绿色 clone or download 的绿色按钮,展开获得 clone with SSh 的 路径,比如 git@github.com:lichen2013/kubernetes.git。
在 server 上执行以下 命令。
git clone git@github.com:lichen2013/kubernetes.git cd kubernetes git remote add upstream https://github.com/kubernetes/kubernetes.git git remote set-url --push upstream no_push
然后就可以在本地建立自己的branch进行代码开发了。
git checkout -b my_branch
在完成代码开发后,向 github 提交代码:
git fetch upstream git checkout master git merge upstream/master git checkout -b my_branch git rebase master git push origin my_branch:my_branch
打开 https://github.com/lichen2013/kubernetes/tree/my_branch,点击New pull request按钮创建新的PR。
相关文章推荐
- AndroidStudio项目提交(更新)到github最详细步骤
- AndroidStudio项目提交(更新)到github最具体步骤
- 如何正确地给 github 的开源项目提交 pull request具体一些,比如 fork 之后创建几个分支,修改后如何和原项目同步
- AndroidStudio项目提交(更新)到github最详细步骤
- AndroidStudio项目提交到github最详细步骤
- AndroidStudio项目提交(更新)到github最详细步骤
- AndroidStudio项目提交(更新)到github最详细步骤
- AndroidStudio项目提交(更新)到github最详细步骤
- AndroidStudio项目提交(更新)到github最详细步骤
- github----向开源框架提交pr的过程
- AndroidStudio项目提交(更新)到github详细步骤
- 新手使用GitHub客户端提交本地项目到GitHub网站详细步骤
- AndroidStudio项目提交(更新)到github最详细步骤
- AndroidStudio项目提交(更新)到github最详细步骤
- Github | 如何贡献Android开源项目和提交补丁
- AndroidStudio项目提交(更新)到github最详细步骤
- AndroidStudio项目提交(更新)到github最详细步骤
- AndroidStudio项目提交(更新)到github最详细步骤
- AndroidStudio项目提交和更新到github的详细步骤
- AndroidStudio项目提交到github详细步骤