简体   繁体   中英

.gitignore is hidden in VSCode

my VSCode (Insiders) hid the .gitignore a few days ago, and I cannot revert this, I tried searching a lot, but the solution of adding:

{
...
"files.exclude": {
    "**/.gitignore": false
  },
...
}

in settings.json doesn't work, in the Settings with UI I only have:

  • .svn
  • .hg
  • CVS
  • .DS_Store
  • Thumbs.db

The .git folder isn't hidden, nor .vscode or other files starting by . , just .gitignore .

I'm using VSCode Insiders 1.69.0-insider , commit 4c72dedb4ad283a569f83a7389468c3ae2c742c3 .

This might be because vscode/issue 152891 has been fixed:

set "explorer.excludeGitIgnore": "true"

Meaning excludeGitIgnore is now working in insider.

This is discussed in issue 152543 :

Looks like a recent change means .gitignore now always gets hidden in Explorer unless you have set "explorer.excludeGitIgnore": true , in which case the .gitignore file shows but none of the .gitignored files do.

I saw that even having a folder without Git initialized in it still results in the .gitignore being hidden.
Seems like it's a default behavior and the explorer.excludeGitIgnore setting changes this behavior.

I tried messing with the Files: Exclude setting and adding a negated glob (or whatever that's officially called) to get the gitignore back, but that didn't work.

It should be fixed now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM