Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »


This page is in draft status. Don't trust anything you read here.


This page documents how to use Git with the Asterisk project.

On this Page

Proposed Policies

  1. Submitting
    1. Submitters cannot +2 a change without a +1
    2. Submitters cannot +2 a change that they +1'd, when they are the only person who put a +1 on a review
  2. Topics should be the ASTERISK issue (if available)
  3. All cherry-picks must use the same topic (-t option)
  4. All testsuite tests should use the same topic as the underlying Asterisk changes (-t option)
  5. Cherry picks can be done after a +2, but the code change must not be submitted until all branches have cherry-picks
  6. Don't use -R.



For basic instructions on using Gerrit with the Asterisk project, see Gerrit Usage.

Branch Cherry-Picking

Patches being submitted to the project must be cherry-picked to other branches when either:

  • The patch is a bug fix. In this case, the patch should be cherry-picked to all supported branches that have the bug.
  • The patch is a new feature or improvement, and tests have been written to cover the new feature or improvement. In that case, the patch may be submitted to other supported branches.


    Not all changes are appropriate for all branches. See Software Configuration Management Policies for more information. If you have questions about whether or not a change is appropriate for a particular branch, feel free to ask on the asterisk-dev mailing list or in #asterisk-dev.

Cherry-picking can be done either when a patch is first proposed, or it may be done when the patch has been reviewed but prior to it being submitted. If you plan on cherry-picking after an initial review, please indicate so in a comment on the review.

Cherry-Picking using git review

If you have already submitted a patch for review, you may cherry pick to a new branch using git review:

As an example, if we previously posted for review a code change for Asterisk 11, and the Gerrit Review ID is 30, we might use the following for Asterisk 13:

Cherry-Picking using git cherry-pick

You may cherry pick using git cherry-pick as well. When performing the cherry-pick using git, make sure that the Change-Id header is the same between all branches.

As an example, if we committed the following to Asterisk 13:

We could then cherry pick this back to Asterisk 11 using the following:

The resulting commit must have the same Change-Id as the Asterisk 13 commit for Gerrit to recognize that this is a cherry-picked commit:

When posting it for review to Gerrit, you should also use the same topic as the original patch. Generally, this is the ASTERISK issue.




  • No labels