We‘d love to hear about how you would like to contribute to Cobalt! It’s worth reading through this modest document first, to understand the process and to make sure you know what to expect.
Before Cobalt can use your code, as an unaffiliated individual, you must sign the Google Individual Contributor License Agreement (CLA), which you can do online.
If you are a company that wishes to have one or more employees contribute to Cobalt on-the-clock, that is covered by a different agreement, the Software Grant and Corporate Contributor License Agreement.
The Contributor License Agreement is necessary mainly because you own the copyright to your changes, even after your contribution becomes part of our codebase, so we need your permission to use and distribute your code. We also need to be sure of various other things — for instance that you‘ll tell us if you know that your code infringes on other people’s patents. You don‘t have to sign the CLA until after you’ve submitted your code for review and a member has approved it, but you must do it before we can put your code into our codebase. Before you start working on a larger contribution, you should get in touch with us first with your idea so that we can help out and possibly guide you. Coordinating up front makes it much easier to avoid frustration later on.
All submissions, including submissions by project members, require review. We currently use Gerrit Code Review for this purpose. Currently, team-member submissions go through private reviews, and external submissions go through public reviews.
We admit that this submission process is currently not completely optimized to make contributions easy, and we hope to make improvements to it in the future. It will always include some form of signing the CLA and submitting the code for review before merging changes into the Cobalt master tree.
git clang-format HEAD~ to apply default C++ formatting rules, followed by
git commit -a --amend to squash any formatting changes into your commit.
git cl upload to upload the review to Cobalt's Gerrit instance.
git commit --amend to add them to the existing commit. Then return to step 2.