What dumb-HTTP servers need run after each push.
git update-server-info rewrites the static metadata files that a dumb-HTTP server needs to advertise refs and packs. Run it on the remote after every push when the server has no Git CGI of its own.
Dumb HTTP is just Apache serving files. Without server-side Git, the client cannot ask 'what refs do you have?' -- so we pre-bake the answer into info/refs and objects/info/packs and let the static server hand those files out.
git update-server-info [-f | --force]
Regenerates `info/refs` (one line per ref: SHA TAB refname) and `objects/info/packs` (one line per packfile). Runs in the current repo (typically a bare repo behind the web root).| Flag | What it does |
|---|---|
-f, --force | Rewrite the info files even when they look up to date. |
(implicit) info/refs | Generated under <gitdir>/info/refs for ref discovery. |
(implicit) objects/info/packs | Generated alongside packfiles so clients can enumerate them. |
(implicit) post-update hook | The shipped sample hook in hooks/post-update.sample is just exec git update-server-info. |
git http-backend CGI.info/refs has been deleted or gone stale.git update-server-infogit update-server-info -fmv hooks/post-update.sample hooks/post-updategit clone --bare repo.git && cd repo.git && git update-server-infogit http-backend CGI) instead -- it is faster and needs no server-info dance.post-update hook so refreshes happen automatically.git http-push, which is itself almost never wanted.info/refs is plaintext; anyone who can read it sees every ref name in the repo.Hit each option, then Check answers. Score is recorded; Next is always open.