Skip to content

# VSCode Backup This repository helps you back up and restore VSCode settings, keybindings, snippets, and installed extensions across macOS, Linux, and Windows. ## πŸ”„ Backup ```bash ./backup.sh

Notifications You must be signed in to change notification settings

jplitte/vs_code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

VSCode Backup

This repository helps you back up and restore VSCode settings, keybindings, snippets, and installed extensions across macOS, Linux, and Windows.


πŸ”„ Backup

Run the following script to back up your current VSCode configuration:

./backup.sh

This backs up:

  • settings.json
  • keybindings.json
  • All user snippets
  • List of installed extensions β†’ vscode-extensions.txt

Backed up files are stored in the User/ folder.


Restore on a New Machine

To restore your VSCode configuration on a new system:

./restore.sh

Make sure the code CLI is available on your path.

To enable the code command from VSCode:
Open VSCode β†’ Press Ctrl+Shift+P β†’ Run:
Shell Command: Install 'code' command in PATH


OS Compatibility

OS Supported? Notes
macOS βœ… $HOME/Library/Application Support/Code/User
Linux βœ… $HOME/.config/Code/User
Windows βœ… Uses $APPDATA/Code/User (compatible with Git Bash or WSL)

What Gets Backed Up

File/Folder Description
User/settings.json Global VSCode editor settings
User/keybindings.json Custom keybindings
User/snippets/ All user-defined code snippets
vscode-extensions.txt List of all installed extensions

etup with GitHub

To track and sync your config across machines, set up a Git repo:

git init
git add .
git commit -m "Initial VSCode backup"
gh repo create vscode-backup --private --source=. --remote=origin --push

Requires the GitHub CLI


Tips

  • Consider automating backups with a cron job (Linux/macOS) or Task Scheduler (Windows).
  • Always ensure VSCode is closed before restoring settings to avoid overwrites.
  • Run backup regularly, especially after major customization or extension changes.

Encrypt Settings Before Upload

If you're backing up sensitive snippets or settings, consider encrypting the backup with gpg:

tar czf - User/ vscode-extensions.txt | gpg -c > vscode-backup.tar.gz.gpg

Then commit the .gpg file instead of the raw data.


About

# VSCode Backup This repository helps you back up and restore VSCode settings, keybindings, snippets, and installed extensions across macOS, Linux, and Windows. ## πŸ”„ Backup ```bash ./backup.sh

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages