I cannot find an example here: http://www.kernel.org/pub/software/scm/git/docs/git-http-backend.html
Is it possible?
Add this to your httpd.conf (Assuming /srv/git contains your repos)
Order allow,deny
Allow from all
SetEnv GIT_PROJECT_ROOT /srv/git
SetEnv GIT_HTTP_EXPORT_ALL
ScriptAlias /git/ /usr/lib/git-core/git-http-backend/
Then make sure apache can write to your repository directory (from inside repo run this where http is your apache user)
chown -R http .
In the repository you have created on the server open up .git/config and add the following
[http]
receivepack = true
and finally in the repository root run
git config --bool core.bare true
alternatively if you want a the files available on the server (for a web site or whatever) then disregard the above command and edit .git/config with this
[receive]
denyCurrentBranch = false
and then run this on the server when you want to update the dir (there must be a better way so please let me know)
git reset --hard