git init --bare /foo/bar/web.git/
cd /foo/bar/web.git/
mv hooks/post-update.sample hooks/post-update
chmod a+x hooks/post-update
git update-server-info
cd /foo/bar/project.git/
git remote add web /foo/bar/web.git/
git push web
cd /foo/bar/
curl -u foouser:foopass -X DELETE https://foo.bar/web.git/
find web.git/ -type f -exec curl -u foouser:foopass --ftp-create-dirs -T "{}" "https://foo.bar/{}"
git archive --format=tar --prefix=foo-0.4.2/ v0.4.2 | xz - > foo-0.4.2.tar.xz