Create contribution.md

This commit is contained in:
Binary Wang 2017-06-11 17:05:45 +08:00 committed by GitHub
parent 23a8afee76
commit ee5115697a

View File

@ -1,7 +1,7 @@
# 代码贡献指南
1. 非常欢迎和感谢对本项目发起Pull Request的同学本项目代码风格为使用2个空格代表一个Tab因此在提交代码时请注意一下否则很容易在IDE格式化代码后与原代码产生大量diff这样会给其他人阅读代码带来极大的困扰。为了便于设置本项目引入editorconfig插件请使用eclipse的同学在贡献代码前安装相关插件IntelliJ IDEA新版本自带支持如果没有可自行安装插件。
1. 本项目可以采用两种方式接受代码贡献:
* 第一种就是基于[Git Flow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow)开发流程因此在发起Pull Request的时候请选择develop分支,详细步骤参考后文,推荐使用此种方式贡献代码。
   * 第一种就是基于[Git Flow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow)开发流程因此在发起Pull Request的时候请选择dev分支详细步骤参考后文推荐使用此种方式贡献代码。
* ***暂停此种方式,请使用第一种***另外一种贡献代码的方式就是加入SDK Developers开发组前提是对自己的代码足够自信就可以申请加入加入之后可以随时直接提交代码但要注意对所做的修改或新增的代码进行单元测试保证提交代码没有明显问题。
1. 另外提交代码前请检查代码是否已经格式化并且保证新增加或者修改的方法都有完整的参数说明而public方法必须拥有相应的单元测试并通过测试。
@ -28,7 +28,7 @@ $ git push
```bash
$ git remote add upstream https://github.com/wechat-group/weixin-java-tools
$ git fetch upstream
$ git checkout develop
$ git rebase upstream/develop
$ git push -f origin develop
$ git checkout dev
$ git rebase upstream/dev
$ git push -f origin dev
```