Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>When you have dependent reviews in Gerrit (that is, one change in review which is dependent on an earlier change which is simultaneously in review), and you need to make modifications to the earlier change, you effectively have to resubmit both changes (since the second change becomes dependent on a different "parent" commit)</p> <p>So the situation is that you have two commits in a single branch off of the main development branch, like this:</p> <pre><code>o master \ o Commit A (in review, requires change) o Commit B (in review, no changes required) </code></pre> <p>What I generally do in this situation is to make the changes requested of Commit A in a third commit. Our commit graph now looks like this:</p> <pre><code>o master \ o Commit A (in review, requires change) o Commit B (in review, no changes required) o Commit C (modifications to Commit A) </code></pre> <p>Now I do <code>git rebase -i master</code> and reorder Commit C to come after Commit A but before Commit B, and then squash it into Commit A. The commit graph now looks like this:</p> <pre><code>o master \ o Commit A' (Commit A, incorporating the changes from Commit C) o Commit B' (the same changes made in Commit B, but applied to Commit A' instead of A) </code></pre> <p>Finally, <code>git review</code> (or whatever command you use to submit changes to gerrit) to re-submit both commits to Gerrit.</p> <p>It's because of complications like this that most people strongly recommend working on each distinct change in a separate branch and then squashing down into a single commit before submitting to Gerrit, rather than needing to deal with these types of situations where you have dependent changes being reviewed at the same time.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload