gitgerritgerrit-trigger

how to create change using gerrit in browser


I am using gerrit rest api create change in browser

  1. 'POST /changes/' change info

  2. 'PUT /changes/{change-id}/edit/path%2fto%2ffile'

  3. 'PUT /changes/{change-id}/edit:message'

  4. 'POST /changes/{change-id}/edit:publish'Conflict 409

    on step 4,gerrit response [409 Conflict] ,how to fix?


Solution

  • The /changes/ endpoint is used to create the change, this is the first step of the Code Review workflow to have something integrated in Gerrit using REST.

    After that you need (at least):

    If you have conflict you'll get an error in the last step (submit). This means that you have based your work in a commit which is not the latest one in the branch and you need to rebase your commit and create another change patchset.

    To learn more about the rebase process see the following: