Git flow
To contribute to Kaa project on GitHub, use the GitHub flow. In a nutshell, it means that you should branch from the main repository and contribute back by making pull requests. That is a generally accepted process flow on GitHub.
Getting started
To follow the instructions in this guide and start contributing to Kaa project on GitHub:
-
Fork the Kaa main repository.
-
Clone your new repository. To do this, run the following command.
git clone git@github.com:<your_github_name>/kaa.git # Replace <your_github_name> with your GitHub profile name. cd kaa
-
To synchronize with the main repository, add it to the remotes.
git remote add upstream https://github.com/kaaproject/kaa.git
Now your upstream points to kaaproject/kaa.
Branches
The master branch represents the latest development version of Kaa. Most changes should go there.
The release-x.x branches are used as stabilizing branches for maintenance releases. All actual releases are tagged.
If you want to backport a bug fix, open your pull request (PR) against the appropriate release branch.
Merge requirements
No merge conflicts
Resolve any merge conflicts that may arise. If conflict occurs, a corresponding message will be displayed on the PR page on GitHub.
To resolve a conflict, run the following commands.
# checkout a branch you open PR from
git fetch upstream # assuming upstream is kaaproject/kaa
git merge upstream/merge_branch # Where merge_branch is a branch you open PR against.
# resolve pull requests
git add changed_files
git commit
git push
GitHub will automatically update your pull request.
Testing
All pull requests are automatically tested using Travis and Jenkins. In case some tests fail, fix the issues or describe why the fix cannot be done.
Review
Every pull request is reviewed by the assigned team members as per standard GitHub procedure. Reviewers can comment on a PR, approve it, or request changes to it. A PR can be merged when it is approved by at least two assigned reviewers and has no pending requests for changes.
Gatekeepers
Gatekeeper is a person responsible for the final review and merge. They are also responsible for managing Git repositories. Only gatekeepers can write to master and release branches.
If a pull request meets all merge requirements, one of the gatekeepers performs the final review and merges the PR branch.