2015-12-15 17:32:54 +01:00
## Submitting Patches ##
2013-10-18 13:36:32 +02:00
------------------
2014-02-26 12:24:52 +01:00
Our ROM is open source, and patches are always welcome!
2013-10-18 13:36:32 +02:00
You can send patches by using these commands:
cd < project >
< make edits >
git add -A
git commit -m "commit message"
2018-08-13 10:12:43 +02:00
git push ssh://< username > @gerrit.omnirom.org:29418/< project > HEAD:refs/for/android-9.0
2013-10-18 13:36:32 +02:00
2016-08-24 04:04:00 +02:00
Register at < gerrit.omnirom.org > and use the username that you registered there in the above command
2013-10-18 13:36:32 +02:00
Commit your patches in a single commit. Squash multiple commit using this command: git rebase -i HEAD~< # of commits>
If you are going to make extra additions, just repeat steps (Don't start a new patch), but instead of git commit -m
use git commit --amend. Gerrit will recognize it as a new patchset.
2016-08-24 04:04:00 +02:00
To view the status of your and others patches, visit [OmniROM Code Review ](https://gerrit.omnirom.org )
2013-10-18 13:36:32 +02:00
2015-12-15 17:32:54 +01:00
## Maintaining Authorship ##
----------------------
2017-01-20 04:27:53 +01:00
Maintaining authorship is a very important aspect of working with Open Source code. If you wish to submit a patch/fix
2015-12-15 17:32:54 +01:00
from anywhere else (another ROM, project, etc.), it is imperative that you maintain the ownership of the person whose
2016-08-24 04:04:00 +02:00
work you are seeking to include. Doing so will ensure that credit is given where it is deserved, and the [prinicples of open source ](http://opensource.org/docs/osd )
2015-12-15 17:32:54 +01:00
are upheld. Your contribution to the project will still be recognized as you will forever be listed as the committer.
If you manually cherry pick a patch/fix then you will need to add the original author prior to pushing to our [gerrit ](https://gerrit.omnirom.org ).
This is a very easy task to perform, and is usually done after you commit a patch/fix locally. This is accomplished
after you type in `git commit -a` , type in the commit message and save. You would then do the following:
```bash
git commit --amend --author "Author < email @ address . com > "
```
So it should look like this once you get all of the author's information
```bash
git commit --amend --author "Spencer McGillicuddy < spencer.the.bestest @ gmail . com > "
```
Alternatively, adding as part of the original `git commit` message is preferred and done like the following:
```bash
git commit --author="Author < email @ address . com > " -m "[commit message]"
```
This saves time, and when part of your normal routine, prevents the infamous "ermahgerd I forgot to add authorship -
let me fix it because I was found out!" message.
## Getting Started ##
2013-10-18 13:36:32 +02:00
---------------
2016-08-24 04:04:00 +02:00
To get started with OmniROM, you'll need to get
2016-05-31 07:45:27 +02:00
familiar with [Git and Repo ](https://source.android.com/source/using-repo.html ).
2013-10-18 13:36:32 +02:00
2016-08-24 04:04:00 +02:00
To initialize your local repository using the OmniROM trees, use a command like this:
2013-10-18 13:36:32 +02:00
2018-08-13 10:12:43 +02:00
repo init -u git://github.com/omnirom/android.git -b android-9.0
2013-10-18 13:36:32 +02:00
Then to sync up:
repo sync
Then to build:
cd < source-dir > ; . build/envsetup.sh; brunch < device_name >
2014-02-26 12:24:52 +01:00
If you need more information or a more detailed guide, click [here to see our wiki. ](http://docs.omnirom.org )
Our official IRC Channels are hosted on Freenode:
[#omnirom - USERS ](http://webchat.freenode.net/?channels=omnirom/ )
[#omni - DEVELOPERS ](http://webchat.freenode.net/?channels=omni/ )