Hi Guys,
We are migrating from HG to Git. Our set up is like so:
Dev locally, commit and push the code to our dev server and test, then we take the code on dev and put it on prod. So, : local -> dev server/staging -> production server
How we do this with HG is the following:
From local to devserver
hg commit -m 'stuff'
hg push ssh://user@devserver//var/django/projects/project_name
ssh -l username devserver 'hg update -R /var/django/projects/project_name
From devserver to production Login to server
mkdir /var/django/projects/project_name ; cd var/django/projects/project_name ; hg init
hg pull ssh://username@devserver//var/django/projects/project_name
/etc/init.d/apache reload
I am trying to replicate this same thing with Git but have had no luck with getting these to work. So far what I've tried to do was:
Local
git init
git add .
git commit
git remote add origin ssh://user@devserver/var/django/projects/project_name
git push origin master
Dev Server
git init
(source code lives here for testing)
Production server
git init
git remote add origin ssh://user@devserver/var/django/projects/project_name
git pull origin master
Problem is the git way I am doing it is not updating the production server with the latest committed changes
Any ideas how I can do this type of workflow?
Regards,
Jeff