GitHub Workflow
For simple changes like documentation updates, you can submit a GitHub pull request.Fork and create a pull request
Fork the repository and create a pull request from your forked repo. Follow the GitHub forking guide for detailed instructions.
Automatic conversion to Gerrit
Your GitHub PR will be automatically converted into a Gerrit change list (CL) by a copybara-service bot. The bot will leave a comment on your PR with a link to the Gerrit CL.
Review and updates
Any changes made to the PR after opening will also be synced by the bot into the Gerrit review.
Gerrit Workflow
The primary code review workflow uses Gerrit. This is the recommended approach for most contributions.Prerequisites
Before starting, ensure you have:- Installed depot_tools
- Checked out the source code using
gclient
Verify git-cl Configuration
There is acodereview.settings file in the repo to configure things automatically:
Creating and Uploading a Change
Create a branch
Create a new branch for your changes. We recommend using your username as a prefix:Alternatively, use
git new-branch:Upload to Gerrit
Upload the patch to Gerrit for review using The command returns a URL for the review. Attach this review to your issue in https://dartbug.com.
git cl upload:Updating Your Change
To update the CL after review feedback:Syncing with Latest Changes
If new changes have been made to the repo, sync up before submitting your code. Option 1: Merginggit rebase-update from any branch:
Getting Your Change Reviewed
Ensure you have reviewers
Ensure your change has at least two reviewers who are OWNERS on your CL:Check the “Reviewers” on the CL. There should be at least two.
Add more reviewers if needed
If there aren’t enough reviewers, use the ADD OWNERS button to add more.If you can’t get enough reviewers, or the reviewers are not responsive, you may add reviewers found in the
OWNERS file at the root of the repository to escalate.For Committers: Submitting a Patch
If you have commit access, when the review is done and the patch is ready:Submit to CQ
On https://dart-review.googlesource.com, press Submit to CQ (CQ stands for “Commit Queue”).
If you do not have commit access, a Dart engineer will commit on your behalf, assuming the patch is reviewed and accepted.
Alternative: Using git cl land
You can also submit directly from the command line:Merging Contributions from Non-Committers
If the author of a patch is not a committer, they will need help landing the patch. Once a patch gets an LGTM:- Find and open the review on https://dart-review.googlesource.com
- Follow the submission instructions above to submit the patch
Cleaning Up
After submitting, delete your local branch to keep the repo clean:Additional Resources
For more detailed instructions on thegit cl tools, visit the depot_tools tutorial.