Start by forking the pd
GitHub repository, make changes in a branch and then send a pull request.
After forking the PD upstream source repository to your personal repository. You can set up your personal development environment for PD project.
$ cd $GOPATH/src/github.com/pingcap
$ git clone < your personal forked pd repo>
$ cd pd
$ git remote add upstream https://github.com/pingcap/pd
$ git fetch upstream
$ git merge upstream/master
...
Before making code changes, make sure you create a separate branch for them.
$ git checkout -b my-feature
After your code changes, make sure that you have:
- Added test cases for the new code.
- Run
make test
.
After verification, commit your changes.
$ git commit -am 'information about your feature'
Push your locally committed changes to the remote origin (your fork).
$ git push origin my-feature
Pull requests can be created via GitHub. Refer to this document for more details on how to create a pull request.