作者:隆威SU_486 | 来源:互联网 | 2023-09-25 13:16
当在github上发现别人项目有BUG,或者想要完善其功能的时候,该如何把自己的修改提交到项目中呢?以logback为例步骤:1,fork一份logback代码到自己的仓库进入github要修改项目
当在github上发现别人项目有BUG,或者想要完善其功能的时候,该如何把自己的修改提交到项目中呢?
以logback为例
步骤:
1, fork一份logback代码到自己的仓库
进入github要修改项目的主页,点击fork按钮,fork一份代码到自己的仓库

2, clone出fork后的项目
git clone https://github.com/xxxx/logback.git
3,使本地代码与原始项目关联
git remote add upstream https://github.com/qos-ch/logback.git
4,关联后,拉取原始项目代码到本地
git fetch upstream
5,本地进行修改
6, 提交代码到自己fork的github仓库
git commit -a -m '修改备注'
git push
7, 进入github上自己fork的项目,创建提交请求到原始代码



8, 之后等待原始项目的拥有者merge你提交的代码