There are 2 way how you can make contribution
To merge a pull request you need to have two remotes - one for Apache repo and another for GitHub mirror. They can be added like this:
git remote add apache https://git-wip-us.apache.org/repos/asf/incubator-ignite
git remote add upstream git@github.com:apache/incubator-ignite.git
<xxx>
with the pull request number):git fetch upstream pull/<xxx>/head:pr-<xxx>
git merge --squash pr-<xxx>
git commit --author=“John Doe <jdoe@apache.org>" -m “ignite-999 - Cool feature implemented. Closes #<xxx>.”
git push apache master
+------------+ +---------------+ +-----------------+
| | replica | | fork | |
| Apache Git | ==========> | GitHub Mirror | ---------> | John Doe's Fork |
| | | | | |
+------------+ +---------------+ +-----------------+
^ ^
| |
| |
| +-----------------+
| *Apache Git remote handle for committers* | |
+------------------------------------------------| Local clone |
| |
+-----------------+
You can start by cloning the Ignite GIT repo.
Clone the repo
git clone https:
//git-wip-us
.apache.org
/repos/asf/incubator-ignite
We use git as our version control system. To streamline the process of giving proper credit to the contributors when committing patches, we encourage contributors to submit patches generated using "git format-patch"
command. This has many benefits:
Long story short, it makes both the contributors' and committers' lives easier, so please generate your patches using git format-patch
.
We have the following requirements for patches:
We prefer that you use the following step-by-step instructions when developing with Ignite.
For example, if you are starting working on the feature IGNITE-9999.
## Get the repo
git clone https://github.com/apache/incubator-ignite.git
## Some development here with many commits at ignite-9999.
git commit -a -m 'ignite-9999: Intermediate commit 1';
...
git commit -a -m 'ignite-9999: Intermediate commit 100';
## Commit the last changes.
git commit -a -m 'ignite-9999: Implemented.';
## Making patch.
## There are a lot of changes at ignite-sprint-999 and we need to get it, resolve conflicts (if exists), rerun tests for ignite-9999.
git checkout master
git pull
git checkout ignite-9999
git merge master
## Run script to make patch. Patch will have all changes as one commit.
<ignite_home>/scripts/git-format-patch.sh
Note: it is strongly recommended to merge 'master' branch to your development branch, for example, every day (or after each commit).
Created patch-file should be attached to a JIRA ticket and the ticket status should be changed on Patch Available.
If you do everything correctly, then all necessary TC test builds will be triggered automatically in 3 minutes period, and a comment with triggered build information (test package names, TC build links) will be added to the JIRA.
Requirements (to auto triggering the test builds):
Contributor patches have to be applied by next command.
git am -s <patch-file>
This command apply a patch file generated by 'git format-patch', stores information who created a patch and who applied a patch. So, it gives proper credit to the contributor and store an information who decide to take these changes.
If patch file has been created by scripts/git-format-patch.sh then a name of a patch-file contains a short hash revision of master branch revision against which patch has been created. Patch file template is
master_<hash>_ignite-<ticket-number>.patch
For example
master_b001525_ignite-9999.patch
So, in case, if a patch can't be applied without conflicts on the HEAD of master and the patch has been created by scripts/git-format-patch.sh then a commiter can apply the patch to master by a revision hash, review changes and resolve the conflicts by yourself.