I use Apache to serve my Git repos over HTTP via mod_dav. To automate the process of setting up a new repo I wrote this bash script:
#!/bin/sh
if [ -z $1 ]; then
echo 'Argument required.'
exit 1
fi
REPO_ROOT=/home/demo/git
REPO=$REPO_ROOT/$1.git
mkdir $REPO
cd $REPO
git --bare init --shared=group
git --bare update-server-info
sudo chown -R demo:www-data $REPO
sudo chmod -R ug+rw $REPO
echo Done.
Hope that helps in some way.