What folders/files are now considered core for Magento 2? As in "Don't edit these files since they can be overwritten in an update" I need to scan a site for core overrides and I'm looking for the folders to compare against fresh install.
Assume "core" by default
When you initially download Magento through composer, it creates all of those folders and files. This means that all of those can be updated by Magento.
The only safe files to modify are:
- anything in the
- as well as any files you've manually created in the root folder (such as
(These also happen to be the same files you should commit, except for
Trying to compare to a fresh install likely won't work: Consider the
vendor folder. It has stuff from Magento itself, but if you ever add a module from a 3rd party, it also goes in the
vendor folder. (In fact, I recommend adding your custom site changes this way as well).
However, your problem (I believe) is solved if you only let people commit certain files (as I've listed above). This way, you know that they aren't overriding core files. See GIT and deployment strategies (I recommend Vladimir's answer)
/vendor/ files and
/lib/ files. you can make extends / override the files if you use the needed path for the file you want to change, ex:
if you want to edit
menu.js file from
/lib/web/mage you would have to do an extend of it and declare it in
requirejs-config.js of your theme or ( NOT RECOMANDED ) copy the file in
Your_Theme/web/mage/ and it will override it.