# Summary: Git Workflow for PDS Webroot ## Setup Complete ✅ Your `/pds/caddy/webroot` is now a git repo connected to Tangled that auto-syncs! ## How It Works: **On Your Mac:** - Clone the repo, add `status.html` to `.git/info/exclude` - Edit `index.html`, `create.html`, terms, privacy, etc. - Push changes to Tangled - `status.html` is ignored locally (no conflicts!) **On the Server (automatic every 5 minutes):** 1. Pull latest changes from Tangled (gets your Mac edits) 2. Generate fresh `status.html` with current metrics 3. Commit `status.html` 4. Push everything back to Tangled ## Result: - 🎨 You edit HTML from your Mac → pushes to Tangled - 📊 Server auto-updates status.html every 5 min → pushes to Tangled - 🔄 Server always pulls before pushing (so it gets your changes) - ✅ No merge conflicts ever! ## Commands You Need: **On Mac (first time):** ```bash git clone git@tangled.sh:madebydanny.uk/mbd-pds cd mbd-pds echo "status.html" >> .git/info/exclude ``` **On Mac (daily use):** ```bash # Edit files, then: git add . git commit -m "Updated homepage" git push origin main ``` **On Server (optional manual trigger):** ```bash systemctl start status-report.service # Forces immediate update ``` That's it! 🚀