How can I ignore whole git repository in visual studio code?

You could also select which repositories to hide manually:

enter image description here


Another solution is to use the Ignored Repositories in settings, for example to ignore the repository in home directory you can add:

"git.ignoredRepositories": [
    "/home/holms"
],

Or from the settings editor (my username is obi)

enter image description here


Had the same problem, try adding option:

"git.autoRepositoryDetection": false

and close repo from your parent (home) folder. It shouldn't appear again.

Update:

There's now an option to watch only repositories for opened files: "git.autoRepositoryDetection": "openEditors"

This way, if you open any file in a specific repository, vscode will only watch it.