src/third_party/ceres-solver/docs/html/contributing.html
We welcome contributions to Ceres, whether they are new features, bug fixes or tests. The Ceres mailing list is the best place for all development related discussions. Please consider joining it. If you have ideas on how you would like to contribute to Ceres, it is a good idea to let us know on the mailing list before you start development. We may have suggestions that will save effort when trying to merge your work into the main branch. If you are looking for ideas, please let us know about your interest and skills and we will be happy to make a suggestion or three.
We follow Google’s C++ Style Guide and use git for version control. We use the Gerrit to collaborate and review changes to Ceres. Gerrit enables pre-commit reviews so that Ceres can maintain a linear history with clean, reviewed commits, and no merges.
We now describe how to set up your development environment and submit a change list for review via Gerrit.
Download and configure git.
Sign up for Gerrit. You will also need to sign the Contributor License Agreement (CLA) with Google, which gives Google a royalty-free unlimited license to use your contributions. You retain copyright.
Clone the Ceres Solver git repository from Gerrit.
Build Ceres, following the instructions in Installation.
Configure your Gerrit password with a .gitcookies which allows pushing to Gerrit without having to enter a very long random password every time:
Make your changes against master or whatever branch you like. Commit your changes as one patch. When you commit, the Gerrit hook will add a Change-Id: line as the last line of the commit.
Push your changes to the Ceres Gerrit instance:
Wait for a review.
Once review comments come in, address them. Please reply to each comment in Gerrit, which makes the re-review process easier. After modifying the code in your git instance, don’t make a new commit. Instead, update the last commit using a command like the following: