我正在尝试将我的Zend Framework 2供应商目录中的目录(及其内容)供应商列入白名单.
/ vendor中的原始.gitignore文件如下所示:
# Add here the vendor path to be whitelisted
# Ex: for composer directory write here "!composer" (without quotes)
!.gitignore
*
Run Code Online (Sandbox Code Playgroud)
现在我想将目录SupplierName列入白名单,我认为这不应该太难.我已经阅读了gitignore上的文档并尝试了以下配置:
首先尝试,在评论之后添加!SupplierName,我必须在此处添加白名单路径.
# Add here the vendor path to be whitelisted
!SupplierName
# Ex: for composer directory write here "!composer" (without quotes)
!.gitignore
*
Run Code Online (Sandbox Code Playgroud)
在那之后,我执行git status了没有显示vendor/SupplierName目录.git add vendor/SupplierName显示以下消息:
您的.gitignore文件之一忽略以下路径:vendor/SupplierName
第二次尝试
# Add here the vendor path to be whitelisted
# Ex: for composer directory write here "!composer" …Run Code Online (Sandbox Code Playgroud)