Reputation: 103
In the standard Windows Explorer, the repo contains all the expected files: A snip of my file directory.
In VSCode, the .gitignore
file does not display in the explorer. It's still seemingly functional (all files in the .gitignore
are ignored), but it poses an annoyance. Most notably, the .gitignore
file does appear in other repos that I have on my machine.
Help would be appreciated.
Upvotes: 10
Views: 6551
Reputation: 11396
There are a bunch of settings related to this, VS Code is pretty flexible and powerful here.
command palette
(shift-cmd-p on mac, or just type > in the regular file explorer)Preferences: Open Workspace Settings
gitignore
Use Ignore Files
There are lots of other interesting settings to fiddle with there too. Your changes will then be reflected in [your project folder]/.vscode/settings.json
Upvotes: 3
Reputation: 71
Check in your project folder .vscode/settings.json
.
In section files.exclude
most likely you will see the line
"**/.gitignore":true
Comment out or delete it and the file will appear in Visual Code Explorer
Upvotes: 7