It depends whether you want to share the settings inside the
On our team, we don't put
.vscode into the
.gitignore file because we want to share our team's recommended settings, launch configurations, tasks and extensions between developers. If you have machine specific settings then that won't work so well.
If you only want to share some settings between developers then you can pick and choose which settings files to put into
.gitignore. Recommended extensions are in
.vscode/extensions.json, for example.
Whether you want to share these settings is somewhat dependent on what sort of repository it is. If it's an open source repository where everyone might want different configurations for their own workflows then maybe it's best not to check them into git. For teams where it's nice to have your configuration shared for a consistent workflow then it often works well to check them in.