# Sample Hooks

Place these as desired in `.git/hooks/` WITHOUT the suffix.

You will just need UV with pygittools in your virtual environment.

## post-receive.notify and post-commit.notify

Wake pygitweb's long-poll subscribers (`updates=true`) on every push (server-side) and
every local commit (client-side). They share two environment variables:

- `PYGITWEB_NOTIFY_URL` — the running server's notify endpoint (default
  `http://127.0.0.1:8000/_internal/notify`)
- `PYGITWEB_PROJECT` — project path as known to pygitweb (default: the bare repo's
  directory name with `.git` stripped, or for non-bare clones the working-tree directory
  name)

The pygitweb summary page can install both at once via the **Update Hook** row, which
manages them as the `update` bundle.