From e1c1ae4baba27fa249b045614f580771df866982 Mon Sep 17 00:00:00 2001 From: John Liu Date: Wed, 20 Mar 2019 14:13:01 +0800 Subject: [PATCH] added the doc 'development-workflow.md' (#1464) * added the doc 'development-workflow.md' --- CONTRIBUTING.md | 2 ++ docs/development-workflow.md | 66 ++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 docs/development-workflow.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d1780f68973..e726e881fdc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,6 +21,8 @@ This is a rough outline of what a contributor's workflow looks like: - Submit a pull request. - Your PR must receive LGTMs from two maintainers. +More specifics on the development workflow are in [development workflow](./docs/development-workflow.md). + More specifics on the coding flow are in [development](./docs/development.md). Thanks for your contributions! diff --git a/docs/development-workflow.md b/docs/development-workflow.md new file mode 100644 index 00000000000..4a95d72f535 --- /dev/null +++ b/docs/development-workflow.md @@ -0,0 +1,66 @@ +# Development Workflow + + +Start by forking the `pd` GitHub repository, make changes in a branch and then send a pull request. + +## Set up your pd GitHub Repository + + +After forking the [PD upstream](https://github.com/pingcap/pd/fork) source repository to your personal repository. You can set up your personal development environment for PD project. + +```sh +$ cd $GOPATH/src/github.com/pingcap +$ git clone < your personal forked pd repo> +$ cd pd +``` + +## Set git remote as ``upstream`` + + +```sh +$ git remote add upstream https://github.com/pingcap/pd +$ git fetch upstream +$ git merge upstream/master +... +``` + +## Create your feature branch + + +Before making code changes, make sure you create a separate branch for them. + +``` +$ git checkout -b my-feature +``` + +## Test your changes + + +After your code changes, make sure that you have: + +- Added test cases for the new code. +- Run `make test`. + + +## Commit changes + + +After verification, commit your changes. + +``` +$ git commit -am 'information about your feature' +``` + +## Push to the branch + + +Push your locally committed changes to the remote origin (your fork). + +``` +$ git push origin my-feature +``` + +## Create a Pull Request + + +Pull requests can be created via GitHub. Refer to [this document](https://help.github.com/articles/creating-a-pull-request/) for more details on how to create a pull request.