Preventing files from being overwritten
If a file is present in both the git repo and the upstream repo of a composer package, it will be overwritten during a full build when composer install
is run. An example is where you need to modify .htaccess: as the .htaccess file is part of the magento2-core package, the modified version in git will be overwritten during build.
Composer can be configured to specifically not overwrite certain files by adding the following to the composer.json file (in this example the .htaccess and .user.ini file will not be overwritten by any upstream composer package)
"extra": { "magento-force": "override", "magento-deploy-ignore": { "*": [ "/.htaccess", "/.user.ini" ] } }
You can then check the version of the .htaccess file that you need deployed into the repository (if it is not there already).
, multiple selections available,