Is `gt sync && gt restack` the same as doi...
# how-do-i
a
Is
gt sync && gt restack
the same as doing
gt sync
? Since
gt sync --restack
is the default behavior, I am a bit confused.
j
gt restack
will restack your current branch even if syncing reveals new conflicts —
sync
just informs you that you have conflicts and exits
but in the common case, you don't need to do
restack
a
oh I see.
Hmmm, still not super clear
is
gt sync --restack
equivalent to
gt sync && gt restack?
j
I'll rephrase — I see how that was unclear
gt sync
(as long as you don't pass
--no-restack
) restacks all of your branches that can be restacked without manual resolution. If you current stack has manual resolution required, you'll need to run
gt restack
to do that. To resolve conflicts in other stacks, you would check out a branch from that stack and then run
gt restack
So if you
gt sync
and you don't have conflicts to resolve in your current stack,
gt restack
will no-op