🌿 Git repository watching
Beyond copying files, the engine watches git repositories: it detects when a local repo has work that hasn't been pushed to the remote — the classic hole in code backups.

What it does
- Discovers
.gitdirectories under your roots (configurable inmeta.repos_cfg; if empty, typical user roots). - One watcher per repo: when the
.gitchanges (commit, checkout…), it reschedules the check immediately. git ls-remoteon its own cadence against the remote (system user credentials —GIT_TERMINAL_PROMPT=0so it never hangs asking for a password).- Computes a risk score per repo (local commits without push, remote ahead, divergence) and publishes it to
status.json→ the app shows the icons.
Per-repo actions
From the app (POST /repos/{id}/action):
- push — uploads the pending commits.
- fetch — pulls down what's new from the remote.
- pull --ff-only — fast-forward only, never a surprise merge.
A complement to the backup
The watched repo tells you "this code exists only here": copying the folder protects the files, but the unpushed commit is what really gets lost in a disaster. Watching warns you before it happens.