I have a basic web hosting account through GoDaddy. It has plenty of space, and I was curious if I could use it as a push/pull/clone point.
I've read that Git supports HTTP(S) operations through WebDAV, but I've never used it. I'm not that familiar with WebDAV in general or how it works.
Is it possible to setup this sort of limited server to work with Git? I do not have SSH access on my accou开发者_Python百科nt, but I do have permissions to config some basic .htaccess settings.
There's two ways of hosting a git-repo on an http-server:
- "smart" HTTP, where you need a cgi-script installed on the server. This will probably not work for you, as basic web-hosting usually don't allow user-scripts.
- "dumb" HTTP, which is simply maintained by uploading the repo to the web-host. This would probably work for you.
"dumb" HTTP is a bit more awkward to use for the person who pushes to it, but it JustWorks(tm) for those who pulls from it. The pusher needs to run "git update-server-info" on the repo, and somehow get the repository over to the server (in the same way you'd usually upload files).
See the Git Book for details: http://book.git-scm.com/4_setting_up_a_public_repository.html
精彩评论