nyxsonsleep

vscode 怎么排除.vscode 文件夹

  •  
  •   nyxsonsleep · Dec 7, 2023 · 2301 views
    This topic created in 1065 days ago, the information mentioned may be changed or developed.

    尝试过 files.exclude 和 files.watchexclude 添加**/.vscode都没效果。

    具体情况:我的 vscode 有插件有时会创建一个 settings.json 文件,会在 source control 里显示。

    7 replies  •  2024-02-03 23:09:49 +08:00
    9
    9
    Dec 7, 2023❤️1
    1
    在 .gitignore 写入

    .vscode/
    xiaojun996
    xiaojun996
    Dec 7, 2023
    2
    1. 想要在 vscode 的 Explorer 隐藏,需要在当前 vscode 打开的 root 下添加 .vscode/settings.json 文件,并在里面加上:

    ```json
    {
    "files.exclude": {
    ".vscode": true
    }
    }
    ```

    2. 想要在 vscode 的 Source Control 里看不到,其实就是在 .gitignore 里添加 .vscode
    nyxsonsleep
    nyxsonsleep
    OP
    Dec 7, 2023
    3
    @9 不希望在.gitignore 中加入这种特定 ide 的文件。我记得 idea 就单独有自己的管理不用插入到.gitignore 中
    nyxsonsleep
    nyxsonsleep
    OP
    Dec 7, 2023
    4
    @xiaojun996 看来是没其他方法了。
    deorth
    deorth
    Dec 8, 2023 via Android
    5
    不支持
    9
    9
    Dec 9, 2023❤️1
    6
    @nyxsonsleep 额,有洁癖么。.gitignore 就是做这个事情的呀,随便看下 GitHub 上带 .gitignore 的都是这样写的

    不仅 ide 相关的文件,操作系统相关的文件(*.DS_Store ,Thumbs.db )也得在这里排除掉
    fpure
    fpure
    Feb 3, 2024
    7
    @nyxsonsleep 你彷佛对.gitignore 的用法有什么误解,特定 ide 的文件就应该写进.gitignore 里面
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2390 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 68ms · UTC 11:13 · PVG 19:13 · LAX 03:13 · JFK 06:13
    ♥ Do have faith in what you're doing.