tags:

views:

124

answers:

5

I have a bare repository initialize on my webserver. I code on my workstation and I'm able to push/pull/commit changes to it. Now, I want to deploy this code on the webserver but into my apache directory (/var/www/html). If I wanted to track the changes (only pull no push) from this directory, should I clone the repo first?

This way I can make changes locally, then commit and push to "central repo" and then pull from the documentroot folder to see the changes in "prod."

A: 

See: http://www.capify.org/index.php/Capistrano

Rimian
+3  A: 

I think the keyword you're looking for is "continuous integration". There are tons that are geared for SVN but GIT is new so it's slowly rolling out. I use CruiseControl.NET for my .NET projects and it's a dream!

I don't know the technology your projects are in but for GIT Hudson comes to mind. Link to Hudson GIT plugin: http://wiki.hudson-ci.org/display/HUDSON/Git+Plugin

Good Luck! Hope this helps

used2could
+1  A: 

If you want to do it without mucking with Ruby on Rails or just want to keep it simple, I suggest checking out http://more.zites.net/git_deploy_code_changes

I'm running into the same thing as you and this worked for me best.

sublimegeek
A: 

I ended up using git clone and then pulling changes from the repo.

luckytaxi
A: 

git is not quite suitable for deployment. I suggest writing your own deployment scripts, or using a tool like capistrano.

hasen j