user827570
user827570

Reputation: 491

How can I use git to push changes to a production server?

I'm having trouble setting up git on my production server, I want to be able to make local edits and then push them to my live server ubuntu 11.10.

I was able to make a git repo on my server with gitosis but that simply made a repo that I can clone and push to but I couldn't figure out how to create a repo for a live folder for instance

/home/william/appname

and then clone it and make edits locally.

Anybody able to relate and point me in the right direction.

Essentially what I'm trying to accomplish is what phpfog use for there files, you clone your app and your able to make changes to it.

Cheers

Upvotes: 0

Views: 278

Answers (1)

boruch
boruch

Reputation: 463

You can use a postcommit script to autoupdate the working copy (webroot) when the main repo on the prod server (bare repo) gets updated. And then push all the changes to the Master on the bare repo.

Also you can use a CI server to do that for you (eg Hudson )

Good luck. P.S. htaccess the .git folder away.

Upvotes: 1

Related Questions