Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added the doc 'development-workflow.md' #1464

Merged
merged 3 commits into from
Mar 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down
66 changes: 66 additions & 0 deletions docs/development-workflow.md
Original file line number Diff line number Diff line change
@@ -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
nolouch marked this conversation as resolved.
Show resolved Hide resolved
$ 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.