...
Fork the Apache Geode mirror project on GitHub - https://github.com/apache/incubator-geode
Code Block [img]
Clone the apache repository Clone your fork locally so you can actually start working.
Code Block git clone https://github.com/markitogit-wip-us.apache.org/repos/asf/incubator-geode.git
After cloning add your fork as an upstream additional remote so you can push code to your fork can actually reference the original Apache Geode repository.
Code Block git remote add upstreammyfork https://github.com/apachemarkito/incubator-geode
Your git remote should look like the following:
Code Block git remote -v origin https://github.com/markitogit-wip-us.apache.org/repos/asf/incubator-geode.git (fetch) origin https://github.com/markitogit-wip-us.apache.org/repos/asf/incubator-geode.git (push) upstream myfork https://github.com/apachemarkito/incubator-geode (fetch) upstream myfork https://github.com/apachemarkito/incubator-geode (push)
Create a local develop branch (develop is where all new development work goes).
Code Block Fetch remote branches and checkout develop
Code Block git fetch upstream # update your local branch git checkout develop
Geode follows git-flow conventions so if you do have git-flow installed in your system just do:
Code Block git flow init
Answer master on the first question ("Which branch should be used for bringing forth production releases?"). Press enter for the remaining questions to select the default options.
Then create your feature branch with the number of the JIRA task that describes your work (fix/feature).
Code Block git flow feature start GEODE-41 Switched to a new branch 'feature/GEODE-41' Summary of actions: - A new branch 'feature/GEODE-41' was created, based on 'develop' - You are now on branch 'feature/GEODE-41' Now, start committing on your feature. When done, use: git flow feature finish GEODE-41
If you don't have git flow, you can just create a feature branch manuallyCode Block git checkout develop git pull git checkout -b feature/GEODE-41
Complete your work (commits) and in order to update the ticket with your progress use the following syntax in your commit messages:
Code Block git commit -a -m "[GEODE-41] #comment My new cool feature XYZ"
Follow the guidelines for good commit messages. Here's an example:No Format GEODE-526: Fix oplog unit test race condition KRF files are created asynchronously. The test needs to wait for the files to be created before checking header content.
If you've modified source code, execute 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 @dev list.
Code Block ./gradlew buildprecheckin
- When work is complete, consider whether documentation to be updated or created due to the new feature.
If/When needed to push your local work to GitHub use the following command:
Code Block git push --set-upstream originu myfork feature/GEODE-41
- Open GitHub web inteface and you should see your just pushed branch with a 'Compare & pull request' button
This will lead to 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 finally click on Create pull request
- The review process starts and once approved your PR will be merged into develop. if it's not approved or require some additional work, go back to the commit step.
Now you can go ahead and finish your feature
git flow feature finish GEODE-41Code Block Accepting the Pull-request
As a reviewer/committer do the review using GitHub or if needed request a ReviewBoard submission.
Once the PR is approved since the GitHub repository is a ready-only mirror you actually need to download the patch and apply. The JIRA ticket must have the link to the patch in the comments section, something like: https://github.com/apache/incubator-geode/pull/6.patch
Alternatively add GitHub as a remote to the ASF clone and just fetch pull requests. For example:
...