5

I'm looking for some advice on using Joomla and Bitbucket for version control purposes. I am very new to Git (Bitbucket) and I am hoping that someone will be able to help me understand things a little better in relation to Joomla.

First of all, a little background. We currently develop sites using Joomla. The main part of this process is template development. We create a new and bespoke template for each Joomla website. We currently host all of our 'in development' websites on an online server which means that our customers can track there progress. No development is done locally, although I have used MAMP in the past. I use Coda 2 to connect to the development site via FTP, I download a file, make changes and then re-upload that file.

I have recently hired another developer and we have run in to version control issues by using the process above. Therefore I have created a Bitbucket account so that we can track changes. My problem is that I don't know how to include Bitbucket into the workflow outlined above.

I have had a look at a Joomla extension called Git 2 FTP deploy http://rd-media.org/extensions/git2ftp-deploy.html but I'm not sure if this is what I need.

I don't like to develop locally as my customers can't see their website so it is a case of me having one site locally and then a copy of that site on the testing server? If so then how do I sync database changes?

As you can see I am quite confused by the issue and I am probably looking at it all wrong. I have done a lot of research online but I can't seem to get my head around it. If anyone can help in any way then I would really appreciate it.

Thank you

2 Answers 2

2

I would suggest you do actually work locally when doing your development. You can then push your changes to Bitbucket using Git and then use a Hook to automatically update the repository on the development server for your clients to view.

There are some good answers here which will help you:

https://stackoverflow.com/questions/3728054/git-push-to-live-server

As for database updates, I'm not actually too sure about this, so hopefully someone else on here can give you some good insight on that

3
  • Thanks for the comments Lodder. I have nothing against working locally and I can see the benefits, I just want my customers to be able to see the site that is in development. Commented Jun 11, 2015 at 13:13
  • And they can ;) Once you have committed and pushed a change using Git, the Hook will also push this change to your server so that the custom can see it
    – Lodder
    Commented Jun 11, 2015 at 13:21
  • Thanks Lodder, I will look more into hooks and try and get something working :) Commented Jun 11, 2015 at 14:07
1

Why do you use FTP? It's very insecure, it's better if you could access the server remotely, through an SSH or like wise and from there do a git pull whenever you did changes in your local environment.

I also recommend that you use the .gitignore-file to ignore all files in your repository, except the altered changes your developers make, this to avoid that the actualy Joomla-library comes into GIT, which requires unnnecessary space, and problems at updating times. So if you make a component, you simply type !/public/components/com_my_component, whilst leaving a simple "/" ontop of your .gitignore file.

About the database, you could create so called "patches". Whenever you make an update in your database, you save that information to a file, if you do it from phpMyAdmin you can just copy the line after execution, and put it in a /db folder in your git-repository. Then you pull the latest code on your production-server and import this patch.

So you would work locally, but whenever you did any local changes that doesn't break the application, you can just git push it to your repository, and git pull it on your server, that's the idea.

Hope it works out!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.