I’ve been mulling over this for a few weeks in preparation but kind of stuck in a holding pattern.
Here’s what I’m working with:
Windows Development environment (I know I know. Price is right losing horn.)
Develop off of working directories on a shared drive
Upload changes to FTP test site, send for QA
Once QA is complete, copy files to production-ready directory on shared drive
Upload to Live Site
Both Test + Live environments are on separate, shared hosts with no shell access.
That means I am working with 4 (yes, four) separate directories.
I have a new virtualbox running Ubuntu in a LAMP setup and have copied my production directory to it in hopes of creating a git repository that I can commit to. From there, I’d like to be able to commit to a series of feature branches sitting on top of a development branch. When ready for QA, I’d need to sync my development branch to the test server. When QA is complete, I’d need to merge development into production branch and then sync the production branch ti the live server.
Right now, I just have a working production directory on the virtualbox. I need to initialize a git repository and be able to check it out to my local machine, committing/pushing changes as necessary. I just don’t know what the best way to go about merging/syncing/uploading would be, given the shared host situation.
Any ideas would be greatly appreciated. I’m starting to just confuse myself even thinking about it.
Check out this link for a very useful git branching model:
http://nvie.com/posts/a-successful-git-branching-model/
In your case, the “release” branch would be the QA branch and your master branch would be the branch that would be pushed live.
Once you implement that, you can set up a git hook to automatically push the contents of the directory to the live servers using ftp, ssh or any other protocol you choose.