From 7d2e42669a214f55f78ad4bb007d67094d6c1f15 Mon Sep 17 00:00:00 2001 From: Nguyen Hai Truong Date: Fri, 22 Feb 2019 15:17:32 +0700 Subject: [PATCH] Adding github workflow for contributing to helm Describe detail step-by-step of using github to contribute to helm project. Co-Authored-By: Dao Cong Tien tiendc@vn.fujitsu.com Signed-off-by: Nguyen Hai Truong --- CONTRIBUTING.md | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a20c2b90b..4368c6a9e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -172,10 +172,44 @@ contributing to Helm. All issue types follow the same general lifecycle. Differe ## How to Contribute a Patch -1. Fork the repo, develop and test your code changes. -1. Use sign-off when making each of your commits (see [above](#sign-your-work)). +1. **Fork** the repo [helm](https://github.com/helm/helm) + +Go to https://github.com/helm/helm then hit the `Fork` button to fork your own copy of repository **helm** to your github account. + +2. **Clone** the forked repo to your local working directory. +```sh +$ git clone https://github.com/$your_github_account/helm.git +``` +3. Add an `upstream` remote to keep your fork in sync with the main repo. +```sh +$ cd helm +$ git remote add upstream https://github.com/helm/helm.git +$ git remote -v + +origin https://github.com/$your_github_account/helm.git (fetch) +origin https://github.com/$your_github_account/helm.git (push) +upstream https://github.com/helm/helm.git (fetch) +upstream https://github.com/helm/helm.git (push) +``` +4. Sync your local `master` branch. +```sh +$ git pull upstream master +``` +5. Create a branch to add a new feature or fix issues. +```sh +$ git checkout -b new-feature +``` +6. Make any change on the branch `new-feature` then build and test your codes. +7. Include in what will be committed. +```sh +$ git add +``` +8. Use sign-off when making each of your commits (see [above](#sign-your-work)). If you forgot to sign some commits that are part of the contribution, you can ask [git to rewrite your commit history](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History). -1. Submit a pull request. +```sh +$ git commit --signoff +``` +9. Submit a pull request. Coding conventions and standards are explained in the official developer docs: [Developers Guide](docs/developers.md)