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
?
For me, the only way I could get the Explorer to show ignored files is using this setting:
"explorer.excludeGitIgnore": false
I have file .env
ignored, but would like to see it in the Explorer. The above setting addressed it.
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,
files.useIgnoreFiles
does not seem to exist (anymore?). all settings files.exclude
configuration to tell VSCode what to exclude from the file explorer. It does not use the gitignore file for determining what is visible in the explorer. .gitignore
by setting "explorer.excludeGitIgnore": false
(aka uncheck "Explorer: Exclude Git Ignore"). 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.
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.
.gitignore
itself, but the OP is trying to display the files that are listed inside .gitignore
On the root of your project update the following file: .vscode/settings.json
{
"files.exclude": {
"**/.gitignore": false,
"**/.git": true,
"**/.vscode": false
}
}
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
},
go to Preferences > Settings, uncheck the option search:Use Ignore Files, then it works
I'm use VSCodium, so i don't know if it will help you. Put it in settings.json:
"explorer.excludeGitIgnore": false,