Github贡献PR六部曲

Github贡献PR六部曲

1. fork代码

1
选中自己要贡献PR的仓库,点击Github右上角的fork

2. clone代码

1
git clone git@github.com:{username}/seata.git

3. 设置提交信息

1
2
3
4
git config user.name {username}
git config user.email {email}
git remote add upstream git@github.com:seata/seata.git
git remote set-url --push upstream no-pushing

4. 贡献PR步骤

1
2
3
git checkout remotes/upstream/develop -b {branch name}
git push origin {branch name}
git branch --set-upstream-to=origin/{branch name} {branch name}

5. 提交PR

1
2
3
4
写完代码后,打开github,点击pull request
选择你要合并的分支 base
按照仓库要求填写标题,内容
最后点击Create Pull Request

6. bug修复

1
当有bug时,直接在自己的分支上修改,然后push就好了,直到bug解决完毕,代码被合并后,可以在github上点击Delete branch