This document covers how to contribute to the Any23 project. Any23 uses github PRs to manage code contributions and project manages source code development through the Any23 JIRA instance. These instructions assume you have a GitHub.com account, so if you don't have one you will have to create one. Your proposed code changes will be published to your own fork of the Any23 project and you will submit a Pull Request for your changes to be added.
Lets get started!!!
It's very important that we can easily track bug fix commits, so their hashes should remain the same in all branches. Therefore, a pull request (PR) that fixes a bug, should be sent against a release branch. This can be either the “current release” or the “previous release”, depending on which ones are maintained. Since the goal is a stable master, bug fixes should be “merged forward” to the next branch in order: “previous release” -> “current release” -> master (in other words: old to new)
Development should be done in a feature branch, branched off of master. Send a PR(steps below) to get it into master (2x LGTM applies). PR will only be merged when master is open, will be held otherwise until master is open again. No back porting / cherry-picking features to existing branches!
In your browser, navigate to: https://github.com/apache/any23
Fork whichever repository you wish to contribute to by clicking on the ‘Fork’ button on the top right hand side. The fork will happen and you will be taken to your own fork of the repository. Copy the Git repository URL by clicking on the clipboard next to the URL on the right hand side of the page under ‘HTTPS clone URL’. You will paste this URL when doing the following
git clone command.
On your computer, follow these steps to setup a local repository for working on ACS:
$ git clone https://github.com/YOUR_ACCOUNT/any23.git $ cd any23 $ git remote add upstream https://github.com/apache/any23.git $ git checkout master $ git fetch upstream $ git rebase upstream/master
It is important that you create a new branch to make changes on and that you do not change the
master branch (other than to rebase in changes from
upstream/master). In this example we will assume you will be making your changes to a branch called
ANY23-XXX is named after the issue you have created within the Any23 JIRA instance. Therefore
ANY23-XXX will be created on your local repository and will be pushed to your forked repository on GitHub. Once this branch is on your fork you will create a Pull Request for the changes to be added to the Any23 project.
It is best practice to create a new branch each time you want to contribute to the project and only track the changes for that pull request in this branch.
$ git checkout -b ANY23-XXX (make your changes) $ git status $ git add . $ git commit -a -m "ANY23-XXX Descriptive title of ANY23-XXX"
-bspecifies that you want to create a new branch called
ANY23-XXX. You only specify
-bthe first time you checkout because you are creating a new branch. Once the
ANY23-XXXbranch exists, you can later switch to it with only
git checkout ANY23-XXX. Note that the commit message comprises the JIRA issue number and title... this makes explicit reference between Github and JIRA for improved project management.
It is important that you maintain an up-to-date
master branch in your local repository. This is done by rebasing in the code changes from
upstream/master (the official Any23 project repository) into your local repository. You will want to do this before you start working on a feature as well as right before you submit your changes as a pull request. We recommend you do this process periodically while you work to make sure you are working off the most recent project code.
This process will do the following:
masterbranch with the
upstream/masterso you have all the latest changes from the project
ANY23-XXXbranch so it is up-to-date with the upstream code
$ git checkout master $ git fetch upstream $ git rebase upstream/master $ git checkout ANY23-XXX $ git rebase master
ANY23-XXXbranch is up-to-date with all the code in
When you are happy with your changes and you are ready to contribute them, you will create a Pull Request on GitHub to do so. This is done by pushing your local changes to your forked repository (default remote name is
origin) and then initiating a pull request on GitHub.
Please include JIRA id, detailed information about the bug/feature, what all tests are executed, how the reviewer can test this feature etc. Incase of UI PRs, a screenshot is preferred.
IMPORTANT: Make sure you have rebased your
ANY23-XXXbranch to include the latest code from
upstream/masterbefore you do this.
$ git push origin master $ git push origin ANY23-XXX
Now that the
ANY23-XXX branch has been pushed to your GitHub repository, you can initiate the pull request.
To initiate the pull request, do the following:
masterand will be from your
If you are requested to make modifications to your proposed changes, make the changes locally on your
ANY23-XXX branch, re-push the
ANY23-XXX branch to your fork. The existing pull request should automatically pick up the change and update accordingly.
ANY23-XXX branch has been committed into the
upstream/master branch, your local
ANY23-XXX branch and the
origin/ANY23-XXX branch are no longer needed. If you want to make additional changes, restart the process with a new branch.
IMPORTANT: Make sure that your changes are in
upstream/masterbefore you delete your
You can delete these deprecated branches with the following:
$ git checkout master $ git branch -D ANY23-XXX $ git push origin :ANY23-XXX
See the HowTo Release Apache Any23 guide.