[These instructions used to be on the gerrit groups page which have since ceased to exist after to switch to the new Google Groups]Working in the same package: Dependent changes in the same packageIf you have further work to do in the same package, and your new changes depend on (or build upon) your old work, you need to create a dependent branch.
To switch back and forth between the two branches (e.g. to make additional changes to the uploaded branch) you can use git checkout. You must be sure to stage and commit your work in progress.
Remember, each time you do this, your local sources will "flip". However, when you flip from old-branch to new-branch, you will probably want the changes from old-branch to propagate into new-branch - here's how:
When you are ready to upload and submit, things are slightly more complicated. Here are the three basic steps you may be taking (though not necessarily in this order). Upload old-branch or new-branch for reviewYou should be able to do this at any time. Be sure to carefully un-comment the desired change when you type Submit old-branch after reviews & approvalsYou should be able to do this at any time (if you have the necessary approvals). After this is done, you can quickly update your working tree:
After which "new-branch" should be properly rebased on the submitted old-branch, and thus no longer have outstanding dependencies. TBD: Are these steps sufficient? What might go wrong or might require extra steps? Submit new-branch after reviews & approvalsBecause new-branch builds on old-branch, this would only happen after old-branch has been submitted (see above). TBD: Because time may have elapsed since old-branch was submitted, and cleanup steps may or may not have been done, it would be nice if we could show here how to "check" and confirm that new-branch has been properly rebased and is independent of the no-longer-pending old-branch. |
