All changes to the Geode codebase are tracked via ASF JIRA. Anybody contributing to Geode is highly encouraged to create a JIRA issue describing the nature of the contribution. Remember that even if you start with sending us a pull request, ASF JIRA will be required anyway.
When submitting actual code to Apache Geode in the form of a patch, contributors have two alternatives: GitHub pull request or a git-format patch attached to a JIRA ticket.
This document covers the steps for GitHub pull requests, but if a contributor decides to go the JIRA + Attachment route, the review step of this document should still apply.
Fork the Apache Geode mirror project on GitHub - https://github.com/apache/geode
Clone the apache repository locally so you can start working:
After cloning add your fork as an additional remote so you can push code to your fork. Substitute your GitHub username for 'markito' in this example, or use the GitHub 'HTTPS Clone URL':
Your git remote should look like the following:
Create a local develop branch (develop is where all new development work goes).
Then create your feature branch with the number of the JIRA task that describes your work (fix/feature). The convention is to use feature/GEODE-XXX.
Geode follows git flow conventions. If you want, you can install the command line tool git flow to help you follow those conventions.
Complete your work (commits) and in order to update the ticket with your progress.
Follow the guidelines for good commit messages. Here's an example:
If you've modified source code, execute the precheckin gradle task in order to perform tests related to the components affected by your change. All tests must pass. When in doubt ask on the @dev list.
- When work is complete, consider whether documentation needs to be updated or created due to the new feature.
If/When needed to push your local work to GitHub use the following command:
- Open the GitHub web interface and you should see your just-pushed branch with a 'Compare & pull request' button:
This will lead to the Open a pull request page with detailed information on which fork and branch you going from/to. You should add some descriptive information, if needed, and click on Create pull request.
The review process starts. Once approved, your PR will be need to be merged into develop. If it's not approved or requires some additional work, make changes and go back to the commit step.
Accepting a Pull-request
As a reviewer/committer do the review using GitHub or, if needed, request a ReviewBoard submission.
Accepting a PR Using the GitHub GUI
Once the PR is approved, if you are a committer, you can just merge the PR using the Merge button at the bottom of the pull request. Click the arrow next to the merge button and select the appropriate merge choice (Usually squash and merge to create a single commit on develop).
Accepting a PR Using the Command Line
If there are conflicts, our you would rather you can merge a PR from the command line.
(for local review) Fetch the pull request into a feature branch for review (Here's a neat trick to make this easier: https://gist.github.com/gnarf/5406589).
(for local review) After review is complete you can merge the feature into develop and remove the branch.
Review the changes and rebase if necessary to clean up and modify the history. If there are multiple commits, you may want to squash them together. Remember to add 'This closes #6' to the last commit message so that github will automatically close the PR. If the PR is comprised of just one commit, you can omit the rebase and simply add 'This closes #6' by using '
- Finally, push the commit to the origin repository.
Given the commit message with the PR number, after the push the PR on GitHub will be closed and the JIRA ticket updated.
When using the git log command you will see that Author: and Committer: fields are properly updated and credit is given to the contributor. For example:
Rejecting PRs without committing
If reviewers or committers need to close a PR, it should be closed through the GitHub web interface.
The Geode website is maintained as part of the repository, within the
geode-site directory. Instructions for updating the website are in the