Local dev and Git deployment?

Permalink
This is more a workflow question. I'm no Git ninja but I use it regularly to develop my Wordpress projects. I'd like to do the same with my Concrete ones.

Local

1. My plan is to make a local (empty) repo.
2. Clone Concrete from Git (to be the origin) and then checkout the latest stable tag version.
3. Include H5BP as a sub-module on which to build my theme.
4. Use MAMP to set up DB and Develop locally
5. Push when ready

On the live server

1. Create blank repo
2. Create DB with same credentials as local
2. Pull from my local repo

Rinse and repeat...
When new tags are stable I can merge from origin, test locally and then push up to the server. Sounds great in theory - not tried it yet ;)

However, what's the procedure for switching local to remote DB wise? Is there a setting anywhere in the Concrete5 config files where I can say 'IF local, use these DB credentials, IF this URL, use these'? That would let me use the same DB on each without needing to amend the details as per this moving site doc:http://www.concrete5.org/documentation/installation/moving_a_site/...

Also, anyone done anything similar that can advise of pitfalls?

benfrainuk
 
mkly replied on at Permalink Reply
mkly
I'm not sure how you are doing your db syncs but I typically just ignore
/config/site.php

So the credentials match up.

Then ignore /files/cache and keep /files/backup and just backup/restore the latest backup after a fetch/merge and a push.
benfrainuk replied on at Permalink Reply
benfrainuk
Hi Mkly,

Mmm, good thought about the ignore, that makes a lot of sense.

Don't have any plans for DB sync - I was literally going to export from one and import into the other - do you have any suggestions?

Thanks for the thoughts...