A simple way to keep your settings without commit it in your project git repository is creating a workspace and add folder into it.
When do you create a workspace, you need to save a file code-workspace
. This file contains custom settings, just save this file out of the git repository and will be free to add .vscode
into .gitignore
file.