且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

作曲家-如何忽略某些地图文件?

更新时间:2023-11-16 23:54:04

例如,如果您想防止pub/.htaccess被覆盖,我就是这样工作的.

I works like this, for example if you want to prevent the pub/.htaccess from being overwritten.

将此添加到composter.json

"extra": {
    "magento-force": "override",
    "magento-deploy-ignore": {
        "*": [
            "/pub/.htaccess"
        ]
    }
}

有关更多信息,请参见此处: https://github.com/magento/magento-composer-installer/blob/master/doc/Deploy.md#prevent-single-files-from-deploy

See here for more information: https://github.com/magento/magento-composer-installer/blob/master/doc/Deploy.md#prevent-single-files-from-deploy

备注:在升级Magento版本(2.2.4-> 2.2.5)时,此类文件似乎仍被删除,因此您必须从VCS还原它们

Remark: On upgrading Magento versions (2.2.4 -> 2.2.5) such files still seem to be deleted, so you have to restore them from the VCS