Versioning vs. gitignore classes/config


#1

What makes really sense to versioning in the VCS and what should be ignored?

From the skeleton, i’ve currently (for /var/classes and /var/config):

/var/*
!/var/.gitkeep
!/var/classes/
/var/classes/DataObject

!/var/config
!/var/config/.gitkeep
/var/config/system.php
/var/config/debug-mode.php
/var/config/maintenance.php

Does it make sense to keep the “/var/classes/definiton_*” Files in the VCS for example?

Or these files are appeared new - but for me it makes no sense to hold them in the VCS:

/var/config/extensions.php
/var/config/plugin-process-manager.php
/var/config/staticroutes.php

Any best practice in additon to the skeleton .gitignore?


#2

https://github.com/dpfaffenbauer/pimcore-skeleton/blob/master/.gitignore thats mine


#3

I’ve seen that before. Looks similar like mine before.
But does

!/var/classes

Makes it any sense to hold them in the VCS (and deploy them)? Seems these files will already re-created during deployment automatically from pimcore (correct me if i’am wrong).

Same for example “/var/config/staticroutes.php” - this file is changable via AdminUI.

Ok, maybe it’s a personal decision and own specific workflow what to hold in VCS and what not.


#4

it certainly is. I don’t version generated class files, cause the deployment re-creates them anyway. You can keep them in VCS since 5.2 where they re-introduced fixed ID’s.

Re static routes or other configs: I keep them in VCS and never change anything on prod -> cause the next deployment would overwrite those changes.