0

Today i noticed i didn't have setting sync on, so i enabled it, and before it was enabled, there was a conflict with the settings file and there was a "merge" option so i clicked it, but that didn't merge anything and all my settings and extension settings were lost. I tried looking for a way to revert the changes but couldn't find anything that helped. Things like snippets and extensions have been synced properly for the most part, the only issue is with the settings and extension settings not being synced.

I tried the following: -Going to "Settings Sync: Show Synced Data > SYNC ACTIVITY (LOCAL)" but it was completely empty. -Going to "Settings Sync: Show Synced Data > SYNC ACTIVITY (REMOTE)" but it only shows old synced data and nothing from the local version of my settings. -Logging out & in of github account -Going to the backup folder. Nothing is there but the synced data (which is the default data)

Is there another way to revert changes to the settings.json file?

Enabling Settings Sync didn't merge local settings with old synced data

  • Does this answer your question? [How to recover VSCode settings deleted?](https://stackoverflow.com/questions/68340146/how-to-recover-vscode-settings-deleted) – starball Aug 27 '23 at 08:21

2 Answers2

0

Actually there is a direct introduction on managing setting versions in official docs:

https://code.visualstudio.com/docs/editor/settings-sync#_restoring-data

Find the right version, click the "restore" button, and everything will be fine again.

BTW, I encounted exactly the same problem last night after updating vscode, really pissed me off. I have never met this before, it might come from the new update

buyiihoo
  • 1
  • 1
  • 1
  • This is one of the things i've done but my local activity window was completely empty. Anyways, opening the settings.json timeline and looking for the version before the sync did it for me. – user14628870 Aug 21 '23 at 03:56
0

Try opening your user settings.json file by using the Preferences: Open User Settings (JSON) command in the command palette and then opening the file timeline for it (use the Explorer: Focus on Timeline View command in the command palette) to see if any record of it is saved in the timeline. If so, then you can restore previous versions from there. If not, and you haven't done anything else to keep backups of your config files (Ex. Git repo), then I think you're out of luck.

For keyboard shortcuts, you should be able to do similarly by opening the keybindings.json file with Preferences: Open Keyboard Shortcuts (JSON) in the command palette.

If you lost extensions too, check your .vscode/extensions directory in your user home directory. The files for the extensions you had installed might still be there, and each extension has its own directory containing its ID.

starball
  • 20,030
  • 7
  • 43
  • 238
  • @startball THANK YOU SO MUCH. I opened the timeline view (which is something i never knew existed) and found the version before the sync. You've saved me so much headache – user14628870 Aug 21 '23 at 05:48