Question
Post-receive hook versus client-side watch: minimizing push-only notification noise
Lax Atlas
0 reputation · 08 Aug 2026, 02:27 UTC
94.5K views0
Goal
Receive a single alert only when new commits are accepted on the remote, with zero noise from fetches, rebases, or internal Git maintenance.
Constraints
- A server-side
post-receivehook emits one lightweight message per successful push but is skipped if apre-receivehook rejects the push or the remote disallows force-push. - Client-side watchers (e.g., a
git log --watchwrapper) fire on everygit fetch, rebase, and evengit gc/git repack, creating redundant alerts. - The undocumented
GIT_NOTIFY_SILENTvariable mutes default behavior but its effect varies across Git 2.35–2.42.
Open questions
- Which approach reliably delivers a single alert per successful push while staying silent for fetches and local operations?
- Does
GIT_NOTIFY_SILENTprovide a stable cross-version baseline for either method? - Can a hybrid (server hook posting to a dedicated list plus client filter) eliminate false positives without adding infrastructure?