Is it intentional that the VS Code Extension's "Sy...
# report-bugs
j
Is it intentional that the VS Code Extension's "Sync" button (top left) runs
gt sync -f
instead of
gt sync
? Or can I configure this?
gt sync -f
seems to discard local unsubmitted amends. 1. create a commit on a branch with some changes 2.
gt submit
(push to remote) 3. make some more changes 4.
gt modify
(which amends to the commit locally, so now remote and local differ) 5. Click the "Sync" button or
gt sync -f
--> now the locally amended changes are silently overridden by the remote 😞 This flow makes it such that I need to submit before I sync every time I want to sync, which feels like the wrong flow - cause then I end up submitting, syncing, then submitting again immediately. I think there are two problems here. 1) Sync button should run
gt sync
not
gt sync -f
or at least be configurable 2)
gt sync
doesn't touch the local amends at all, and so
gt sync -f
should warn the user that there are local changes which will be overridden. I get that "force" is a powerful word and so perhaps it's not so surprising, but I think that if
gt sync
does nothing, the next step would be to prompt a warning, before the all-powerful warning-less override outcome. It's worth noting that
gt sync -f
in version
1.7
does not override local amends.... Thanks!
✅ 1
➕ 1
p
(If applicable) To help us repro, please send the following if you haven't already: - PR links, screenshots, and/or debug output if applicable - Repro steps - Does this happen consistently? Just to you or others on your team also? - Is this a regression? Is the problem new? - If you're having an issue with the CLI, please send us debug logs using
gt feedback --with-debug-context <any message>
j
I am on graphite version 1.8.3 This happens consistently, seems to be a regression as of ~ 2 months ago. Happens to other people on the team as well (for people who use the extension, because people who use the CLI run
gt sync
not
gt sync -f
)
p
thanks for your feedback! the sync button in the VS Code extension runs
gt sync -f
by default and was updated in version 1.7.15 and there isn't a way to configure the extension to run
gt sync
. you can utilize the
Sync (skip cleanup)
dropdown option which preserves local amendments but merged branches linger and branches with conflicting local/remote state may be skipped.
s
This is a major problem. I lost work multiple times the last couple weeks before figuring out that graphite was silently discarding my local commits. The Sync button in vs code was fine before why did it need to change?
➕ 1
💯 1
Is this bug fixed in the pre-release version of the vsCode extension?
p
and this is happening with the vs code extension?
s
Yes. Latest extension and CLI Have a branch that is sync’ed to github. Create a local commit. Click the Sync button Local commit is gone.
Screen Recording 2026-04-13 at 9.51.44 AM.mov
p
After doing some more digging, here's what I've found. Previously in the VS Code extension, the sync button wasn't working as designed,
gt sync --force
was being silently suppressed in certain cases, which meant local changes were not being overwritten by the remote version. We released a fix so that it now works as intended. This can definitely be surprising since the
--force
flag does more than just skip confirmation prompts, it also syncs the remote version when there's a conflict between your local and remote branches, where remote always wins (the behavior in the videos). With that being said, I totally agree with the sentiment that the VS Code Extension should allow for configuration/modification to automatically clean branches where local changes are not being deleted. I've created a ticket for our team for this enhancement.
👍 2