part_2
is now dependent on main, we haven't yet restacked it, and we can see that by viewing the Git history with gt log long
:log long
outputmain
has advanced to the squash-and-merge commit for part_1
, but part_2
, even though it is supposed to be based on main
now, is actually still sitting on the old version of part_1
. We can fix that with gt upstack restack
. This command, for the current branch and all recursive descendants, ensures that they are based on the current version of their parents.restack
command, we can see that Git and Graphite are in agreement about the history. Now, we might want to resubmit the restacked versions of these branches, or maybe make some changes to them first to address review comments.git rebase
under the hood, and as with any rebase, you may run into conflicts, in this case between the branch you are restacking and the new version of the parent. Just like with git, you will be prompted to resolve conflicts before continuing, which you can do with gt continue
, which is described in a little more detail in the next section.