Creating a Pull Request on Github
Our source code is versioned using git at the ASF. We also have a mirror on Github that you can use to fork and submit pull requests for review.
Apache Climate Project on Github: https://github.com/apache/climate
Apache Climate JIRA issue tracker: https://issues.apache.org/jira/browse/CLIMATE/
- Make a JIRA Issue and save the Issue Number for later use (i.e. CLIMATE-381)
- Fork the Project on Github
- Clone your fork to your machine
$ git clone https://github.com/username/climate.git
Cloning into 'climate'...
remote: Counting objects: 10580, done.
remote: Compressing objects: 100% (3727/3727), done.
remote: Total 10580 (delta 5444), reused 10580 (delta 5444)
Receiving objects: 100% (10580/10580), 548.19 MiB | 488 KiB/s, done.
Resolving deltas: 100% (5444/5444), done. - Create a Branch and name it using the JIRA Issue Number from Step 1
$ cd climate/
$ git checkout -b CLIMATE-381
Switched to a new branch 'CLIMATE-381' - Do your work on the branch and commit often
git commit
git commit - Push new Branch to Your Repo on GH
$ git push -u origin CLIMATE-381
Username for 'https://github.com':
Password for 'https://username@github.com':
Counting objects: #, done.
Delta compression using up to # threads.
Compressing objects: 100% (#/#), done.
Writing objects: 100% (#/#), ### bytes, done.
Total # (delta #), reused # (delta #)
To https://github.com/username/climate.git
* [new branch] CLIMATE-381 -> CLIMATE-381
Branch CLIMATE-### set up to track remote branch CLIMATE-### from origin. - Log into Github and Create Pull Request via:
https://help.github.com/articles/creating-a-pull-request
Be sure to include the ticket number in the title. Ex: "CLIMATE-381 - My PR Title Here"
Committing to the Master
If you have commit karma on the project be sure to clone the ASF repo found here:
https://git-wip-us.apache.org/repos/asf/climate.git
Add the project's Github mirror as an additional remote.
$ git remote add github https://github.com/apache/climate.git
When a pull request comes in a notification will be posted on the related JIRA ticket (assuming the user followed the above directions). This notification will tell you the pull request number. Fetch the pull request with:
$ git fetch github refs/pull/<pull request number here>/head:CLIMATE-<ticket number here>
Checkout the branch and validate the request (tests work, etc). Checkout master and merge in the changes with:
$ git merge --no-ff CLIMATE-<ticket number here>
When adding the merge commit message be sure reference the pull request number so it is closed properly. For instance, "close #<pull request number here>". Checkout Github's help pages for message formatting help. Publish the changes to the ASF repo with:
$ git push origin master