when I have a multi-branch stack, let’s say someth...
# how-do-i
p
when I have a multi-branch stack, let’s say something like
main -> branch 1 -> branch 2
, and I merge
branch 2 -> branch 1
on github, I always end up in a state in graphite where it doesn’t see or properly sync that merge. After a
gt sync
,
gt checkout
displays
main -> branch 1 -> branch 2
instead of
main -> branch 1
I also see warnings during sync that look like this:
Copy code
WARNING: Unable to clean up the following branches with merged PRs because their commits are not in main.
WARNING: Not operating on these branches and their descendants:
▸ branch 2
WARNING: To clean up these stacks, ensure main contains the merged PRs in the stack.
What am I doing wrong here?
p
(If applicable) To help us more clearly understand what you're trying to do, please provide additional details about: - Screenshots / debug logs / list of commands you've tried to run so far - Your workflow - Current state
p
More details:
Copy code
> gt checkout branch 1

This branch has been updated remotely since you last submitted it.
Last submitted version: v2 (remote at v3).
Run gt get to fetch remote changes.

> gt get
🌲 Fetching branches from remote...
Running git fetch: [========================================] 100% | Done
main is up to date.

WARNING: Unable to clean up the following branches with merged PRs because their commits are not in main.
WARNING: Not operating on these branches and their descendants:
▸ branch 2
WARNING: To clean up these stacks, ensure main contains the merged PRs in the stack.
fyi this is resolved with
gt pop branch 2
and then re-syncing, but this isn’t ideal. Seems like a bug?
👀 1
p
hey Peter, im curious what version of the CLI youre on. Just ran this test on my own and
gt sync
prompted me to delete the merged branch which the ui showed the changes from both branches in branch 1 diff view. also is there a reason to do this in github instead of using
gt fold
?
p
habitual, also we have some team members that aren’t on graphite
Copy code
gt --version                                                                                                                                          1.6.6
p
gotcha, I recommend updating the CLI to the most recent stable version and then let me know if this continues to happen, there have been a number of
gt sync
updates since 1.6.6
p
strange - usually I receive update notifications in the CLI responses. Wasn’t even aware there’s been updates
I’ll try this out and post back!
👍 1