`gt sync` usually detects merged PRs and offers to...
# how-do-i
f
gt sync
usually detects merged PRs and offers to delete the local branch. Just now it didn’t. How can I make it behave? I can of course delete it by hand, but…
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
f
I’ve only run
gt sync
after merging the PR via Graphite web app. Current state is that the local branch is not deleted and appears unmerged
p
Hi Fredrik, What version of
gt
are you running on? If you are on an older version I recommend upgrading to the last version using
gt upgrade
. For understanding why this is happening, please run
gt feedback --with-debug-context <any message>
to share logs and info about your particular
gt
CLI with us.
f
Was running 1.7.8, now on 1.7.9 via Brew. I’ll use the feedback cmd
p
I was able to take a look at your logs and nothing unusual stood out to me. I also see you don't have the graphite merge queue enabled. A few questions: How do you merge PRs? Is there a purple merge status for the PR that's merged? We are not seeing this with any other customers, so I'd imagine it might be something due to the implementation of how you're merging. Some things to try: Can you run
gt branch info
and send me what this returns? Could you could try
gt sync --force
?
f
I typically merge using the graphite web app. Sometimes when I’m on the run I might merge via the mobile github app, but I can’t 100% say what method I used for this branch now that I think of it. Anyway, it is clearly merged:
git branch info
Copy code
westmark/fix-roundup-20251124
2 days ago

Parent: main

commit 906d71777497ea84368eeab54fc03280d283611a
Author: Fredrik Westmark <fredrik.westmark@gmail.com>
Date:   Mon Nov 24 10:57:10 2025 +0100

    add emp id to graph engine props. fix broken oldest node
git sync --force
just restacks the branch
Copy code
Restacked westmark/fix-roundup-20251124 on main.
p
Can you confirm that the commit SHA
906d71777497ea84368eeab54fc03280d283611a
exists as an ancestor of main? Running
git merge-base --is-ancestor 906d71777497ea84368eeab54fc03280d283611a main && echo "commit is in main"
on the latest main will return "commit is in main" if the SHA exists in main's history
f
Nothing is printed 🤔
But the changes from the PR are in
Seems the commit SHA is actually
8715c29896346b684b1e96bda846bb88a5c04447
(?)
git merge-base --is-ancestor 8715c29896346b684b1e96bda846bb88a5c04447 main && echo "commit is in main"
doesn’t print anything either.
Doesn’t matter what commit SHA I use, merge-base always returns non-zero
This happened again now with a new branch. Merged via graphite webapp
p
I haven't been able to reproduce this locally and historically am not seeing any regression on our side. I think there is likely a configuration issue causing this: A few questions to think about: How frequently does this happen? Is this with every PR (or for example PRs that are stacked vs single branches)? What is the difference between the branches that do get auto-deleted and ones that do? What merge strategy are you using? Do you have a merge queue enabled?
f
• So far only single branch PRs. • It is not frequent, but has happened 3 times now in about 2 months out of at least 50 PRs • Using Rebase and Merge. • No merge queue
p
Could you send me links to the PRs where this issue is occurring? I'll file a bug on our side. In the meantime, you will need to run
gt delete
  to delete any branches that have been merged.
f
Sent in DM for the first PR.
Or not, you’re going through Pylon I see.
p
You can DM these to me on slack
f
Not sure if I can since you’re sending messages through Pylon.
p
I'll ping you
Hi Fredrik, I have alerted the engineering team of this issue you're facing. In the meantime, feel free to run
gt delete
in the case
gt sync
doesn't auto-suggest this. If you find an easy repro that would be helpful in understanding what could be going wrong. Thank you for your feedback!
f
Hi AJ. Thank you! I’ll be on the lookout, although it hasn’t happened again since the 27th. I wonder if there was a temporary glitch in the matrix of some sorts
🤞 1