开发者

How do I use GIT with my structure/environment?

开发者 https://www.devze.com 2023-02-22 12:45 出处:网络
I want to use GIT as version control for the PHP/MySQL web app I\'m developing. I\'m going with the server style setup since a couple of developers will also be working on it. I have the sandbox/dev s

I want to use GIT as version control for the PHP/MySQL web app I'm developing. I'm going with the server style setup since a couple of developers will also be working on it. I have the sandbox/dev server running (Ubuntu 10.10 server, LAMP package, CodeIgniter 2.01 framework) and its web root is /data/www/webapp.

How do I correctly set up GIT with my environment? Essentially how do I get GIT's "push to" or "I'm up to开发者_如何学Go date and ready to test" directory the same as the web root (so I can just hit refresh in the browser and see the changes results)?

I'm still learning how GIT works so please excuse any incorrect use of terms. Also please no comments about other VCS systems - I'm sticking with GIT for sure.

Thanks in advance


One possible solution is to use a hook in your repo that will react to either new changes or a tag being updated that will export the new content into the appropriate location for your webserver.

The use of hooks makes things very flexible. There are hook points for quite a few actions in a repository and they can do just about anything (if you write it).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号