Register in Gerrit for first time

In order to create a new account in Gerrit, launch gerrit and click on the “Register” link at the top right of the page, pick your favorite OpenID (List of OpenID providers) or OAuth2 provider and use it to log in.

Currently two OAuth2 providers are supported (pending OAuth2 plugin activation):

GitHub

Google

Switch accounts in Gerrit (Link another identity)

Different OpenID or OAuth2 account can be used (linked) to the same Gerrit user accounts.

Warning:
Please do not login with new account, because in this case you will create new account in Gerrit and not link new OpenID|OAuth2 identity to the existing Gerrit account!

Setting yourself up for gerrit - the easy way

If you have a checkout of libreoffice/core already, you can just run ./logerrit setup, which will try to automatically setup keys and configure ssh for you, and if it can't it will guide you through these steps: if necessary, just follow the steps.

The program will tell you to go to https://gerrit.libreoffice.org, click Register and remember your username. The program will also generate a public SSH key, print it and save it to /home/[username]/.ssh/id_rsa.pub. This key will begin with 'ssh-rsa'. You must enter this key during the registration process on the website (or add it later in SSH Public Keys under Settings in order for gerrit to work.

If ./logerrit test fails and ssh -vvv logerrit informs you about ~/.ssh/config having bad permissions, run chmod 600 config in ~/.ssh.

Note: for the `logerrit` command to work, make sure you have set yourself up o for gerrit. Instructions can be found here.

Note: the git add + git commit step can be done using 'git gui', please remember that the commit subject line should not be longer than 65 characters and the commit message lines, if any, should not be longer than 70 character.

Note: for submissions to master, it is useful to (re)base the changes on a recent version of master, so that CI builds on jenkins can benefit as much as possible from ccache.

Note: LibreOffice uses clang-format to check the patches for conformance to established rules. We use a specific version of clang-format (to avoid inconsistencies that exist between different versions of it, even between minor releases). If there's no clang-format preinstalled on system, a warning will be issued at the time of git commit, with instructions on how to install the required binaries. If you have some version preinstalled, you might not see warnings (but have inconsistent results when buildbots would fail telling you to change formatting the other way), or the preinstalled version might not work (e.g., complaining about command line options). The version used by LibreOffice may be found at https://dev-www.libreoffice.org/bin/.

Only the last line is special and will push all patches in the named local branch to the review queue for the master branch (Adjust accordingly, if you want to submit a patch to one of the release branches or other branches). As a casual contributor your patch needs to have the same email address as your gerrit account has or you will not be allowed to push.

It is a good idea to keep your local branch around while your patch is under review, that will allow to possibly easily push a new version of the patch. In the mean time you can

git checkout master

To return to the master branch... and you can start working on another patch using again the procedure above (create local branch, code, commit, push to gerrit).

Add yourself to the contributor list

If this is the first time you are contributing a patch to the LibreOffice project, please add yourself to the developer and contributor list (following the instructions there) and state the license of your contributions.

Please only send the statement no earlier than when you post your first submission to gerrit and ensure you have permission from your parents!

More on patch submission

As an alternative to the above, you can consider using "git review", as explained at Development/GitReview.

Please note that all contributions to The Document Foundation Wiki are considered to be released under the Creative Commons Attribution-ShareAlike 3.0 Unported License, unless otherwise specified. This does not include the source code of LibreOffice, which is licensed under the GNU Lesser General Public License (LGPLv3). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy (see Project:Copyrights for details). LibreOffice was based on OpenOffice.org.If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.