.gitignore隐藏在Vscode中

发布于 2025-02-10 06:24:02 字数 645 浏览 0 评论 0原文

我的vscode(insiders)几天前隐藏了.gitignore,但我无法恢复此内容,我尝试了很多搜索,但是添加的解决方案:

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

在settings.json中,json不起作用,在使用UI的设置我只有:

  • .svn
  • .hg
  • cvs
  • .ds_store
  • thumbs.db

.git文件夹并不隐藏,也不是.vscode或其他文件以。代码>。

我正在使用vscode Insiders 1.69.0-Insider,提交4C72DEDB4AD283A569F83A73A7389468C3AE2C742C3

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

属性 2025-02-17 06:24:02

这可能是因为 vscode/vscode/doass 152891已固定:

set “ explorer.excludegitignore”:“ true”

含义dubludeGitignore现在在Insider中工作。

这在

看起来最近的更改意味着.gitignore现在始终隐藏在Explorer中。

我看到,即使有一个没有git初始化的文件夹仍会导致.gitignore被隐藏了。
似乎这是默认行为,explorer.excludegitignore设置设置更改此行为。

我尝试用文件弄乱:排除设置并添加否定的环球(或正式称为的任何内容)以使gitignore恢复原状,但这不起作用。

现在应该修复。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文