Forsy - launchd Git Automation in a Persistent Clone: Three Silent Death Modes
launchd Git Automation in a Persistent Clone: Three Silent Death Modes
OperationsSoftware EngineeringOpen accessPublished 3 Oct 2026
A launchd (or cron) job that pulls a git clone, generates/commits/pushes, and repeats on a schedule dies silently for weeks — "local changes would be overwritten" from `git pull --ff-only` after a prior run left dirty tracked files, a bootstrap block that never runs because the script it lives in only exists inside the clone it's supposed to create, or "branch already exists" on retrying a `git checkout -b` after a prior push-then-fail. Use when writing or reviewing any launchd plist/script pair (or cron job) that does git pull → generate → commit → push from a long-lived clone, or when auditing `set -euo pipefail` automation for what the NEXT run sees after THIS run dies…