git notes

upload a repository to a static website hosting service

  1. create a local repository that can be pushed to
    1. git init --bare /foo/bar/web.git/
    2. cd /foo/bar/web.git/
    3. mv hooks/post-update.sample hooks/post-update
    4. chmod a+x hooks/post-update
    5. git update-server-info
  2. add the local repository as a remote and push to it
    1. cd /foo/bar/project.git/
    2. git remote add web /foo/bar/web.git/
    3. git push web
  3. upload the local repository via WebDAV
    1. cd /foo/bar/
    2. curl -u foouser:foopass -X DELETE https://foo.bar/web.git/
    3. find web.git/ -type f -exec curl -u foouser:foopass --ftp-create-dirs -T "{}" "https://foo.bar/{}"
to update the web repository: repeat step 3

create a release tarball

  1. git archive --format=tar --prefix=foo-0.4.2/ v0.4.2 | xz - > foo-0.4.2.tar.xz