Steps to Contribute Code to Omnirom
The beauty of open source projects is the ability for even the most novice of developers to be involved in determining the trajectory of the project. The difficulty is in knowing exactly how to submit your patch for code review and (hopefully) inclusion into the project.
Below are the simple, basic steps for contributing code:
- Begin by performing a repo sync so that we know we’re dealing with the most recent versions of the code. We're also assuming that you have your Omnirom repo in ~/android/omni:
- cd ~/android/omni
- repo sync
- Now go and make the changes to the files you are wanting to patch/include.
- Once done, navigate to the root of the project, i.e. the root of your local repo
- cd ~/android/omni
- Begin a new branch of the local repo so that you can track your changes
- SYNTAX: repo start <branchName> <directoryOfPackageChanged>
- EXAMPLE: repo start bootAnimation vendor/omni
- Note: it is important to use relative path names to where you are in your repo.
- Now navigate to the package directory (<directoryOfPackageChanged> above)
- We need to commit the changes to gerrit for review, along with a message telling exactly what was done for the reviewer(s) to review
- First we make sure to add the files that we changed in order to be committed:
- git add . (this will add all of the files which are new based on the <directoryOfPackageChanged>)
- Now we need to commit the changes:
- git commit -a
- This will open up an editor and at the top line you will need to provide the comment about the changes you have done.
- Suggested format: <PackageName>: <overview of change(s) made>
- Example: Bootanimation: Updated the bootanimation for the project
- Once done press CTRL-O to save your changes, and then CTRL-X to exit
- Your changes will be saved, and you’ll receive a notice about the number of changes to be submitted
Now we need to upload our changes to gerrit for review. Command: repo upload
It is important that any code you contribute follows either the existing licensing, or utilizes the correct licensing. For pre-created headers, see the License template