[英].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:我的VSCode(Insiders)几天前隐藏了.gitignore
,我无法恢复它,我尝试了很多搜索,但添加的解决方案是:
{
...
"files.exclude": {
"**/.gitignore": false
},
...
}
in settings.json doesn't work, in the Settings with UI I only have:在 settings.json 中不起作用,在带有 UI 的设置中我只有:
.svn
.hg
CVS
.DS_Store
Thumbs.db
The .git
folder isn't hidden, nor .vscode
or other files starting by .
.git
文件夹不是隐藏的,也不是.vscode
或其他以.
, just .gitignore
. ,只是.gitignore
。
I'm using VSCode Insiders 1.69.0-insider
, commit 4c72dedb4ad283a569f83a7389468c3ae2c742c3
.我正在使用 VSCode Insiders 1.69.0-insider
,提交4c72dedb4ad283a569f83a7389468c3ae2c742c3
。
This might be because vscode/issue
152891 has been fixed:这可能是因为vscode/issue
152891已修复:
set
"explorer.excludeGitIgnore": "true"
设置"explorer.excludeGitIgnore": "true"
Meaning excludeGitIgnore
is now working in insider.意思是excludeGitIgnore
现在在 Insider 中工作。
This is discussed in issue 152543 :这在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.看起来最近的变化意味着.gitignore
现在总是隐藏在资源管理器中,除非您设置了"explorer.excludeGitIgnore": true
,在这种情况下.gitignore
文件显示但没有.gitignored
文件显示。I saw that even having a folder without Git initialized in it still results in the
.gitignore
being hidden.我看到即使有一个没有初始化 Git 的文件夹仍然会导致.gitignore
被隐藏。
Seems like it's a default behavior and theexplorer.excludeGitIgnore
setting changes this behavior.似乎这是一种默认行为,而explorer.excludeGitIgnore
设置改变了这种行为。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.我尝试弄乱Files: Exclude
设置并添加一个否定的 glob (或任何官方名称)以使 gitignore 恢复,但这没有用。
It should be fixed now.现在应该修好了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.