On 2017-04-19 15:48:04 -0700 (-0700), Clark Boylan wrote:
[...]
> The way I work is to always edit the tip of the series then "squash
> back" edits as necessary.
> So lets say we already have A <- B <- C and now I want to edit A and
> push everything back so that it is up to date.
> 
> To do this I make a new commit such that A <- B <- C <-D then `git
> rebase -i HEAD~4` and edit the rebase so that I have:
> 
>   pick A
>   squash D
>   pick B
>   pick C
> 
> Then after rebase I end up with A' <- B' <- C' and when I git review all
> three are updated properly in gerrit. The basic idea here is that you
> are working on a series not a single commit so any time you make changes
> you curate the entire series.
[...]

I use a similar solution, but with edit instead of squash:

  edit A
  pick B
  pick C

That drops me into a state where any edits I make and subsequently
git add will be integrated into commit A. Then when I git rebase
--continue I'll be prompted subsequently to resolve any resulting
merge conflicts the rest of the way back up the stack to C (assuming
there are any).
-- 
Jeremy Stanley

__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to