At the moment, I reproduce my VS Code configuration on any new machine by tracking the folders ~/.vscode/
and ~/.config/Code/User/
with version control. So when I install an OS on a new machine, I install VS Code, then I link those locations to the actual folder that are in my git repository that I've cloned onto the machine (automated with a script).
It works, but I'm not sure that this is the best way:
- It tracks all the VS Code package sources that are in
~/.vscode/extensions
, which can be a lot of large-size changes committed into my repo.- For example, the file
.vscode/extensions/ms-vscode.cpptools-0.26.2/debugAdapters/lldb/lib/liblldb.3.8.0.dylib
alone is 50MB, and my last commit to update my VS Code config was 299.17 MiB!
- For example, the file
~/.config/Code/User/
contains a lot of stuff too, and probably some of it is junk that doesn't need to be tracked, and VS Code doesn't ship any.gitignore
files in these config folders (maybe they imply for us to track everything?).
What's the recommended way to track my VS Code configuration and replicate it on any machine?
(P.S., if any VS Code devs read this, this is all super simple with Atom, and it does ship with
.gitignore
files which makes it obvious they thought about people tracking their Atom configuration, and.gitignore
prevents them from tracking stuff they don't need to.)(P.S. 2, Here's a feature request for the VS Code team to officially support this.)