I am trying to bed down a development process for our team.
We have 3/4 disperate developers working on our code base at any one time.
We have started using GIT and the idea is that is piece of work is more than a live fix, then they fork the master branch.
Everyone has their own dev environment on the server, and we have one staging environment which should at all times be a copy of the master branch.
Developers develop on their local, then merge back into the master branch, which should then push their changes to the staging server (I want to set up something like this).
If all is approved, then the changes should be copied live. I want to automate this somehow, not sure how exactly. We are using GitHub, so I'm sure there are automated deploy scripts out there.
We only have 1 live server though so it'd be nice if only changed files on the master branch could be deployed to the live server.
Any ideas how to do this?
Is this approach sound?
Any other comments/ warnings?
Is a load balancer necesary to do things like this?
My company following nearest by this blog.
We create the master branch for production. My case is for web development.
Step we do is
Developer fork their feature/bug from master
With this way, we will got the fresh code with already in the released line. In staging server, we use testing branch. So, when any feature want to going test, it will merge to that branch
In staging server we use
There are release branch handling the hot fix, every hot fix will merge to this branch before merge to master. The idea is that release branch will packing some commits before merge to master which if the problem occurs, it just use command like
for temporary.
Let see my full working Step
Email come from boss to fix critical bug
do things
In production
Oops! not working
New commit merged
Continue my job
Ready to release the feature
This is because all things in testing branch ready to deploy. So, when merge all ready feature to release branch, now, you can make final test.
When everything now go production, we do
Automate script
I think you may look into
.git/hooks/post-commit.sample
for hookup some script after you commit the code? anyway, I never use it.