8

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?

nithin alex
  • 111
  • 13
Dan
  • 29,100
  • 43
  • 148
  • 207

3 Answers3

1

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.
Wouter
  • 1,678
  • 3
  • 20
  • 32
1

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.

Laizer
  • 5,932
  • 7
  • 46
  • 73
  • Dont quite agree with that approach, there is plenty of stuff listed there that belongs in source control. – Dan Apr 20 '10 at 10:06
  • Yeah? I find that my changes stay in /app/code/local, app/code/community, app/etc, app/locale, and my template. – Laizer Apr 22 '10 at 13:11
  • Because this URL is no longer available, this question has no real value. This is an excellent example of why relevant data should always be included in the answer. – Ryre May 02 '17 at 04:41
  • I believe I've found a backup here: https://gist.github.com/nickw108/672464/b060f34f05aee18baa2076c736d405aa83142a5f – Ryre May 02 '17 at 04:42
0

We usually have something like:

  • /app/etc/local.xml
  • /downloader
  • /var
  • /media

Media usually contains images that are configured in admin, like product/category images, logos, CMS images, merged JS/CSS and import/export data I believe.

Some extensions also have files in media that should be versioned (ex. product feed templates)

There is also an htaccess file in var and media so you have to include those.

Domeglic
  • 181
  • 2
  • 11