We are a web design company, going down the road of setting up a revision management system, and all the processes around how we are going to use it, etc. We are considering using the git revision management system.
We mainly develop our websites on the Joomla! Content Management System (CMS). I would like to know how other companies manage their repositories when dealing with a CMS. We mainly deal with template building, and we occasionally customise components or plugins we have installed.
My main questions are:
I know this question has already got an accepted answer but maybe someone will come back to this and find it useful.
So what I came up with and seems to be working quite well, is this: Let's say I have a normal J! deloyment with my com_mycomp component inside.
This way a can now create a git repository in COMMON/joomla/myComp.
Obviously, this environment should be a local development environment where you can adjust apache/php configuration, without security implications, to make this work. (I cannot recall if I actually had to do any special configuration modifications for this to work - if it doesn't check the logs...)
As a matter of fact, this solution does resolve another problem. Working this way you can actually symlink your component's codebase folders to two different Joomla deployments (a J!2.5.x and a J3.x.x for example) and be able to develop/check your component compatibiliy in an immediate way against different versions.
This article by Joe LeBlanc is one of the few things I've found regarding Revision Control in Joomla!: http://joomlaablog.blogspot.it/2010/11/how-to-track-your-joomla-project-with.html
There are two general strategies you can employ for using Git with Joomla: either track the entire Joomla installation or track a specific extension. The major deterrent to tracking Joomla itself with Git is the sheer size of the Joomla codebase. While Git is reasonably fast, it can still be overkill to track an entire Joomla installation if you’re adding a single template or module.
On the other hand, putting everything into Git makes it possible to determine when patches were applied to the Joomla site. This can be helpful when you’re trying to trace an issue to a specific patch. Also, if you’re creating a number of extensions that are all designed to work together, you may have no choice but to place the entire site under version control.
If you’re working on a single extension and you know it’s the only one that will be a part of a project, it may be more advantageous to track a single directory. A single frontend only component, backend only component, module, or template are all candidates for being tracked separately from a Joomla installation. It’s difficult to track plugins in this way, due to the fact that plugin .php files are placed side-by-side in shared folders. Tracking complete components this way is also problematic, as changes in the backend can affect behavior in the frontend.
For your first question, usually most groups will check in all files related to projects (excluding logs and temporary files). If you do want to store your database, store a dump of the database (and not the binary files). You should be sure to include both the data and schema.
If you decide for the first option (track the whole joomla) you have to .gitignore all the core and every time an external extension is added. Otherwise is a nightmare when someone installs an extension and commits it. Then you have to discover it after pulling and sometimes it doesn't work. Also the version Joomla changes are difficult to manage.
I advocate for different repositories to different extension, but I'm still looking for a way to have one repo to a whole component (admin+front+install). Any idea (submodules or subtree mergin perhaps) ?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With