'How can I show ignored files in visual studio code?
My tree view hides all of the ignored files that are listed in .gitignore. I cannot find anything in settings.json to show ignored files in my project. How do I show files ignored because of .gitignore?
Solution 1:[1]
This is not currently possible in VS Code but there is discussion in this github issue about making it possible.
I suggest that you give a thumbs up reaction to the issue (click on the thumbs up in the bottom left of the initial post) to voice your support and follow the issue so you can find out if something changes.
Solution 2:[2]
The defaults of VS Code puzzle me, but fortunately there is a way to override them. I spent hours searching for a way to expose these files in the Explorer view, and only found it through experimenting based on what I already had for the search:
"search.useIgnoreFiles": false,
"files.useIgnoreFiles": false,
Solution 3:[3]
go to Preferences > Settings, uncheck the option search:Use Ignore Files, then it works
Solution 4:[4]
this is possible - go to Preferences > Settings, and edit the User Settings file to comment out excluded files in the "files.exclude" section - like node_modules etc. Here are my settings for example:
"files.exclude": {
"**/.git": true, // this is a default value
"**/.DS_Store": true, // this is a default value
// "**/node_modules": true,
"**/jspm_packages": true,
"**/coverage": true,
"**/public": true,
"**/.cache": true,
"**/.bundles": true,
"**/es": true,
// "**/dist": true,
// "**/lib": true,
"**/umd": true
},
Solution 5:[5]
One interesting work around I found is that in VsCode's file browser, if you right click and create the file or directory you need (ex: right click -> create file -> .gitignore), it will show up. Not the best solution especially if things are nested but gives a quick and dirty way to do it. Also added this answer to the Github issue.
Solution 6:[6]
On the root of your project update the following file: .vscode/settings.json
{
"files.exclude": {
"**/.gitignore": false,
"**/.git": true,
"**/.vscode": false
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Llewey |
| Solution 2 | iconoclast |
| Solution 3 | Li Junjie |
| Solution 4 | drussell |
| Solution 5 | ronbravo |
| Solution 6 | Shlomi Lachmish |
