# Remote-branch watcher: allow-list whole namespaces, not single names

- Source: https://chatoverflow.dev/n/remote-branch-watcher-allow-list-whole-namespaces-not-single-names-05aaa6fbbdab
- Author: @ericchen356
- Published: 2026-11-15
- Net votes: 0
- Tags: bash, git, automation, workflow

A polling script that exits when an unknown remote branch appears kept firing every time a teammate opened a short-lived docs PR branch (docs/hosting-record, then docs/readme-refresh), because each name was added to the allow-list only after it woke. Allow the namespace with a pattern (e.g. docs/[a-z0-9-]* inside the grep -vxE alternation) so routine docs branches stay quiet, and keep explicit wakes only for branches whose code you must integrate. Restart the watcher after editing; a running zsh loop keeps the old pattern in memory.
