際際滷

際際滷Share a Scribd company logo
Submit the Change to the Codebase
This exercise shows how to submit a change to the code base. To be submittable a change
must have successfully passed the code review, which means that:
 it got at least one highest possible vote in all voting categories
 and that there are no veto votes on any of the voting categories
Preparation
 follow the gerrit exercises #2 and #3 to create and review a change
 you may also complete the gerrit exercise #4 but it is not mandatory
 make sure your change has highest votes in all review categories
Submitting the change
To submit a change click the Submit Patch Set n button:
There are 3 possible outcomes of the Submit action:
1 The change is merged successfully
If the change merges without any conflicts you will see that the status of the change changed to
Merged.
2 The change is submitted but the merge is pending
If the status changed to Submitted, Merge Pending then the change depends on another
change that is still open (in review). In that case the change will be merged automatically once
all its dependencies are submitted and merged.
3 The submit fails due to merge conflicts
It may also happen that the submit fails due to merge conflicts. In that case you will have to
resolve the merge conflicts in your local branch and then push another patch-set. The steps are:
 Fetch from upstream. This updates the local origin/master remote tracking branch to
the latest state available on the server. Follow the git exercise #5 Fetch the latest state.
 Rebase your feature branch to the origin/master. Follow the git exercise #6 (section
Rebase). You will get conflicts.
 Follow git exercise #6 (section Resolve Merge Conflicts) to resolve the conflicts.
 Commit using the amend option as described in gerrit exercise #4
 Push to the upstream as described in gerrit exercise #2
After that a new patch set is created for this change. The new patch set has again to pass the
code review as shown in gerrit exercise #3
 Submit the change again once it passes the code review
Copyright 息 2014 by C. Halstrick, E. Kempin, S. Lay, S. Zivkov, M. Sohn

More Related Content

Git Tutorial EclipseCon France 2014 - Gerrit Exercise 6 - submit a change

  • 1. Submit the Change to the Codebase This exercise shows how to submit a change to the code base. To be submittable a change must have successfully passed the code review, which means that: it got at least one highest possible vote in all voting categories and that there are no veto votes on any of the voting categories Preparation follow the gerrit exercises #2 and #3 to create and review a change you may also complete the gerrit exercise #4 but it is not mandatory make sure your change has highest votes in all review categories Submitting the change To submit a change click the Submit Patch Set n button: There are 3 possible outcomes of the Submit action: 1 The change is merged successfully If the change merges without any conflicts you will see that the status of the change changed to Merged.
  • 2. 2 The change is submitted but the merge is pending If the status changed to Submitted, Merge Pending then the change depends on another change that is still open (in review). In that case the change will be merged automatically once all its dependencies are submitted and merged. 3 The submit fails due to merge conflicts It may also happen that the submit fails due to merge conflicts. In that case you will have to resolve the merge conflicts in your local branch and then push another patch-set. The steps are: Fetch from upstream. This updates the local origin/master remote tracking branch to the latest state available on the server. Follow the git exercise #5 Fetch the latest state. Rebase your feature branch to the origin/master. Follow the git exercise #6 (section Rebase). You will get conflicts. Follow git exercise #6 (section Resolve Merge Conflicts) to resolve the conflicts. Commit using the amend option as described in gerrit exercise #4 Push to the upstream as described in gerrit exercise #2 After that a new patch set is created for this change. The new patch set has again to pass the code review as shown in gerrit exercise #3 Submit the change again once it passes the code review Copyright 息 2014 by C. Halstrick, E. Kempin, S. Lay, S. Zivkov, M. Sohn