viovenia/statamic-git-sync
Statamic Git Sync keeps your Statamic site's content and configuration in sync with a Git repository, so changes are versioned, trackable, and easy to deploy across environments. A lightweight addon for teams that want Git-backed workflows without manual commits.
+/− counts. That is a shippable answer to the most common stakeholder ask in CMS work ("who edited this and when") without building a custom audit log.statamic:git-sync:doctor exits non-zero, so it can be a deploy gate. Thirteen health checks with remediation text turn "git sync is flaky in staging" from an open-ended support burden into a checklist.pull --rebase with abort-and-restore, and SyncManager::sync() never throwing into a control panel save — these are explicit product decisions about not breaking the editor's session. Adoption here is low-blast-radius, which shortens the internal approval conversation.PullRequestClientContract with GitHub and GitLab implementations mean this can be wired into existing Slack/ops/pipeline tooling rather than becoming a bespoke silo.Adopt when most of these hold:
strategy => 'pull-request' is the differentiating capability and the reason to pick this over Pro automation.doctor warning.Look elsewhere, or wait, when:
git commit --only protects hand-staged files, but a messy repo still produces noisy history.To executives: Content changes are currently untracked or tracked by convention. This package makes every content edit a git commit — attributable to the person who made it, reviewable before it reaches the live site, and reversible with standard git tooling. The pull-request mode is the commercially interesting part: it puts editorial changes through the same review gate as code, which is usually a compliance or brand-safety requirement we would otherwise have to build. It is a small, self-hosted package with no vendor lock-in, and it fails safe — it refuses to commit over an in-progress merge rather than risk corrupting the repo.
To engineering: It is a Statamic addon, PHP 8.2–8.4, Statamic 5 and 6, including Solo. It hooks Statamic content events and commits only configured paths using git commit --only, so it never picks up or unstages work someone did by hand. Debounces per editing session, with a scheduled sweep for anything the event path missed (flushed cache, dead queue worker) so the worst case is a delay, not a lost commit. It never checks out a branch — the PR strategy pushes the current branch and opens/reuses a PR — which avoids swapping files under an editor mid-save. Sixteen contracts and six typed events mean we can swap commit-message formatting, path filtering, forge clients and health checks from our own service provider without forking. doctor exits non-zero and is usable as a CI/deploy gate. SyncManager::sync() does not throw into the save request by design.
The honest caveat to state up front: this is v0.1.0. Functionally it is a considered release — failure classification with backoff, URL credential redaction, conflict handling that defers to a human, a JSONL history file that survives cache:clear — but there is no track record. Propose it as a bounded pilot on one or two collections, behind the doctor gate, with the extension contracts treated as unstable until a 1.0 lands. If the pilot's only output is a clean decision on PR-gated content versus commit-log-only, it has paid for itself.
How can I help you explore Laravel packages today?