Reputation: 17586
Hi i am planning to use version control using GIT and bitbucket to my system . here is my planned structure .
I will do my all new work in trunk , all the code is in bitbucket.
When i want to do a release i will copy my trunk to QA branch, all the code is in bitbucket.
after QA is complete i create a tag in bitbucket .
from QA branch i do a relase to production branch
Using git and bitbucket i can manage my code . control my versions
My problems are these
So how can i sync the data inside bitbucket with QA server and Developement server up to date .
when i commit a code to trunk in bitbucket i need my development server code should be updated . also when i commit a code to QA branch in bitbucket i need my QA server code should be updated
is it possible ?
my project is PHP
My QA and Development servers using LAMP.
Upvotes: 0
Views: 70
Reputation: 43748
Depending on your specific setup, you could potentially use BitBucket's hooks to automatically notify your QA server that there are changes checked in, then it could pull the new data from BitBucket.
Another alternative is to just push your code from your dev machine. Your QA server could have a Git server on it that you can push code to. Normally I would handle this by having 2 "remotes" set up in Git. Then you could:
git checkout qa-branch # switch to QA branch
git merge trunk # bring code changes from trunk into qa branch
git push bitbucket qa-branch # save qa branch to bitbucket
git push qaserver qa-branch # update qa server
On the QA server, you could use Git hooks to respond to code being pushed, and run a script to deploy the code.
I think this is basically what Heroku does when you push code to them.
Upvotes: 1