简体   繁体   English

阻止 Netbeans 8.1 忽略 `vendor` 目录

[英]Stop Netbeans 8.1 from ignoring the `vendor` directory

For PHP projects, Netbeans 8.1 seems to always ignore the vendor directory in Git repositories, regardless of the content of any .gitignore file or the project ignore folders settings.对于 PHP 项目,Netbeans 8.1 似乎总是忽略 Git 存储库中的vendor目录,无论任何.gitignore文件的内容或项目ignore folders设置如何。

Is it possible to stop Netbeans 8.1 from always ignoring the vendor directory?是否可以阻止 Netbeans 8.1 始终忽略vendor目录?

For instance for projects which have a vendor directory that has nothing to do with Composer or for projects where all files required to run the code should be included in the repository?例如,对于具有与 Composer 无关的vendor目录的项目,或者对于运行代码所需的所有文件都应包含在存储库中的项目?

I've found excep ingoring in git settings you also need turn off option "Ignore vendor folder from versioning" here sceen我在 git 设置中发现 excep ingoring 您还需要在此处关闭选项“从版本控制中忽略vendor文件夹” 在此处输入图片说明

Maybe vendor is consider as a non-shareable folder, as build and dist would be in a J2SE project .也许vendor被视为不可共享的文件夹,因为builddist将在 J2SE 项目中
Try, as in issue 194650 :尝试,如issue 194650

Tools > Misc > Versioning > Git. Unselect 'Permanently ignore not-sharable files'

Also, check you <yourRepo>/.git/info/exclude file : it it exists, it might include vendor/另外,检查你的<yourRepo>/.git/info/exclude file :它存在,它可能包括vendor/

As commented by the OP Martijn :正如OP Martijn 评论的那样:

Turns out this is a new feature in NB 8.1.原来这是 NB 8.1 中的一个新功能。
I filed a bug report which was accepted and the next update should have options for disabling this feature for composer, bower and npm folders.提交了一个被接受的错误报告,下一次更新应该有选项可以禁用 composer、bower 和 npm 文件夹的此功能。


That was implemented a few day later in March 2016 : " Ignore vendor directory from versioning " ( changeset 681ac116d63b )几天后于 2016 年 3 月实施:“ Ignore vendor directory from versioning ”(变更集 681ac116d63b

Please, uncheck it (available for Bower, npm and Composer) and ideally restart the IDE.请取消选中它(可用于 Bower、npm 和 Composer)并最好重新启动 IDE。

As @webmak10 mentioned, you need to uncheck "ignore vendor" in PHP -> Framework -> Composer options.正如@webmak10 提到的,您需要在PHP -> Framework -> Composer options.取消选中“忽略供应商” PHP -> Framework -> Composer options.

Please note that restart is necessary to take into account this parameter.请注意,重新启动是必要的以考虑此参数。

Tested with netbeans 11.用netbeans 11测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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