cancel
Showing results for 
Search instead for 
Did you mean: 

Why Magento 2 Does not Ignore Install, Update, and Dev Directories?

SOLVED

Why Magento 2 Does not Ignore Install, Update, and Dev Directories?

As you know in Magento 2 installation, a default .gitignore file is installed with the project which makes tracking repository changes easier and more focused.

However, among the directories which are not being ignored, I noticed three (annoying) folders: update, install, and dev. Since these folders are installed automatically and changed when updating Magento, the changes in these files fill git with irrelevant changes to the developer.

As a newbie in Magento, and in Web development in general, I might be wrong in judging this situation, so my question is why to track these folders since they are being changed by other people (the same situation is vendor directory, which is not being tracked by default)?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Why Magento 2 Does not Ignore Install, Update, and Dev Directories?

Hello @Murtadha Ahmed 

 

These are the files and folders where the security code is written by the default Magento. so no one can directly download the files of code from browsers.

 

If someone forgot to add these files to add in the system then the site security is in trouble so those are added by default.

 

If my answer is helpful full then please set the accept solution flag and kudos flag so other members can take the same reference.

View solution in original post

3 REPLIES 3

Re: Why Magento 2 Does not Ignore Install, Update, and Dev Directories?

Maybe someone edited the .gitignore file. You can edit the permissions to monitor the folders in this file. You can notice if any file has a "!" before file paths, it won't be tracked for changes.

If issue solved, Click Kudos & Accept as Solution.
LitCommerce - The Most Simple & Affordable Multi-channel Selling Tool

Re: Why Magento 2 Does not Ignore Install, Update, and Dev Directories?

These folders are not added to .gitignore by default, see: Magento2 default gitignore file 

Since they are not added to .gitignore, they will be tracked by default, and any change in these folders will be tracked by git.

 

My question is why these folders are tracked by default?

Re: Why Magento 2 Does not Ignore Install, Update, and Dev Directories?

Hello @Murtadha Ahmed 

 

These are the files and folders where the security code is written by the default Magento. so no one can directly download the files of code from browsers.

 

If someone forgot to add these files to add in the system then the site security is in trouble so those are added by default.

 

If my answer is helpful full then please set the accept solution flag and kudos flag so other members can take the same reference.