Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What files in Magento have no purpose being in source control?

Tags:

magento

I am looking to clean up the file that we store in source control (SVN) for the Magento projects we are working on.

Which files/folder are have no purpose being in SVN, ie the ones are not necessary for the site to function, or are only transient?

So far I have identified

 var\cache  

 var\session

 media\temp

 var\locks

downloader\pearlib\download

 downloader\pearlib\cache

There are some I am unsure about:

    var\report

    downloader\pearlib\docs

    media\catalog\product\cache\

Can anyone provide a definitive list?

like image 865
Dan Avatar asked Apr 13 '10 15:04

Dan


People also ask

Which of these files fall under static view files?

Static view files are located in the <magento_root>/pub/static directory, and some are cached in the <magento_root>/var/view_preprocessed directory as well.

Where are Magento files stored?

/lib – The external PHP code library used in Magento. /media – This is storage directory of the Magento media files like generated thumbnails, uploaded product images, etc.

What is static content in magento2?

Static here means that the files which are not dynamically generated can be cached. The word “view” refers to the presentation layer from Model-View-Controller (MVC). The deployment of static view files is influenced by three Magento modes including Production mode, Default mode, and Developer mode.

What is less file in magento2?

Magento 2 supports a CSS preprocessor known as LESS. It extends the capabilities and features of CSS which allows using variables, functions, mixins, nested rules, and operations when writing styles. When you use LESS in Magento 2, you ultimately increase the productivity in the development of front-end styles.


2 Answers

http://activecodeline.com/git-ignore-gitignore-file-for-magento-project answers a larger question, but could be helpful none-the-less.

There's a whole bunch of stuff in Magento that doesn't need to be in source control, as it will remain constant (as long as you follow some sane development practices.) The above link goes through all the directories that need not be tracked by source control.

like image 134
Laizer Avatar answered Sep 20 '22 12:09

Laizer


I typically ignore these folders for development, but you may choose to store images if you think it's appropriate:

  • /var: This is always temp data or data that can be regenerated
  • /media: These are images and uploads, not really source code, but keep if you want
  • /downloader: I don't like to use Magento Connect and prefer to install things manually. You can always get Magento Connect elsewhere, so no need to keep it in the repo.
  • /includes/src: This is compiled source code, you can regenerate if needed. Not really that usefull since we have SSD disks and APC.
like image 36
Wouter Avatar answered Sep 23 '22 12:09

Wouter