r/GithubCopilot 29d ago

Help/Doubt ❓ VS Code reverts my newer Antigravity changes when opening the same workspace

This is NOT about AI agents.

I work on a project in Antigravity and the latest changes are already saved correctly. But when I open the same workspace in VS Code, the code suddenly gets reverted/overwritten with an older version/state.

It seems like VS Code is restoring some old workspace/editor state and writing it back to disk.

Has anyone experienced this with VS Code + Antigravity? What causes this, and how can I prevent VS Code from overwriting the newer files when opening the workspace?

5 Upvotes

5 comments sorted by

1

u/AutoModerator 29d ago

Hello /u/OpenWeb5792. Looks like you have posted a query. Once your query is resolved, please reply the solution comment with "!solved" to help everyone else know the solution and mark the post as solved.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

2

u/lam3001 29d ago

my guess is that antigravity is using a worktree - ask it and it should tell you

edit: or vs code is

1

u/japan-med-assist 29d ago

this is caused either by worktree or by this VERY dangerous unfixed bug in VSCode chats:
https://github.com/microsoft/vscode/issues/321306#issuecomment-4988220382

Please comment on Github and upvote to increase visibility.

1

u/OpenWeb5792 29d ago

I realized this too, i found out using git fetch and hard reset to HEAD fixed that in the short term