I’ve been thinking of a way to easily version control all the Joomla templates we have developed.
The issue isn’t so much that we have a lot of templates. It’s when I want to update a common file to all templates. We currently have 31 templates so that means I have to go through 31 directories and update a single file. It would make sense to change one file and merge it into all the templates.
This is where git & it’s branches comes in. One repository with the master branch that has the common files and the base template that all our templates are based on. Then when we need a new template we create a new branch. As branches never need to be merged back into the master I’d achieve the following:
- Change common file in master branch, can switch branch to a template and pull in the change made in master, go through each template/branch applying the change - would probably be able to script this.
- When creating a new template, switch to master and create a new branch.
- When in a branch can push the changes upto the server instead of having to use winscp to copy from local to remote.
- The biggest one is being able to “undo”, version control.
Also using GitHub makes for easy tracking of what people are up to as well
Interested in people’s comments or feedback.