Architecture: punt all git concerns to DMC GitSync
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
Research direction
Start by reviewing the MDI roadmap and searching the repository for any git shell-outs or git primitives. Done means git auto-commit work is absent from the roadmap, any existing git operations are identified for extraction, and future file-watching work is clearly separated from DMC GitSync responsibilities.
Written by the indexing model from the issue text.
Description
Statement
Markdown Database Integration should not implement git operations. All git concerns (remotes, pull, push, bind, auth, conflict resolution) belong in the separate Data Machine Code GitSync module, which shipped this layer on 2026-04-20.
This issue exists to formalize that boundary so future contributors don't reach for git primitives inside MDI.
Layering
┌─────────────────────────────────────────────────┐
│ DMC GitSync │
│ bind / pull / push / submit / status / policy │ ← ALL git concerns
│ GitHub Contents + Git Data APIs │
│ (no shell, no git binary, no .git/ directory) │
└─────────────────────────────────────────────────┘
▲
│ points at wp-content/markdown/
│
┌─────────────────────────────────────────────────┐
│ Markdown Database Integration │
│ WP post ↔ .md file on disk │ ← filesystem stops here
│ frontmatter / loader / write engine / index │
└─────────────────────────────────────────────────┘
▲
│
┌─────────────────────────────────────────────────┐
│ WordPress (posts, meta, options) │
└─────────────────────────────────────────────────┘
- MDI's job: WordPress post ↔ markdown file on disk. Full stop.
- GitSync's job: markdown file on disk ↔ upstream git repo.
- Integration: GitSync writes files; MDI notices (via file-watching, not git).
What stays in MDI
- File watching / filesystem reactivity — detecting new or changed
.mdfiles and rehydrating the post index. This is incremental-sync plumbing, not a git concern. - Frontmatter round-trip, slug derivation, ID assignment (see #42).
- The markdown ↔ block conversion pipeline.
What moves out (or was never MDI's in the first place)
git commit/git push/git pull/git status— DMC GitSync.- Remote repo configuration and auth — DMC GitSync.
- Branch / worktree management — DMC GitSync.
- Conflict resolution semantics — DMC GitSync.
- PR creation for wiki-content syncs — DMC GitSync's
submitability.
Why this matters
MDI must work identically across environments:
- Self-hosted with DMC + GitSync installed
- Studio local dev (symlinked MDI checkouts, no DMC)
- WP.com / VIP (no drop-ins, no DMC)
- Minimal installs with only MDI
Coupling MDI to git primitives would produce two code paths — one for "git is available" and one for "git isn't" — which is exactly the class_exists() branching the ecosystem explicitly forbids inside feature flows. Users on managed hosts would get a subtly different MDI than self-hosters.
Keeping git in GitSync makes MDI portable, and makes GitSync swappable (the same markdown/ directory could be synced by any alternative implementation — Meilisearch-based sync, inotify-based local mirror, a Dropbox-style agent, etc.).
Action items
- Confirm current MDI roadmap does not list "git auto-commit" or similar. If it does, remove it.
- If any code inside MDI currently shells out to
git, extract it. (Spot-check says no, but double-check.) - Future "file watching" work (fs_events, inotify, polling) lands in MDI. Future "sync this dir with GitHub" work lands in DMC GitSync.
References
- DMC GitSync shipped: data-machine-code#38, PR #42, #43
- DMC GitSync is API-first (GitHub Contents + Git Data APIs) — works on WP.com Business, WP Engine, Pantheon, etc.
- Dominant language
- PHP
- Stars
- 7
- Forks
- 1
- Avg merge
- 3h 16m
- Merged PRs (30d)
- 44
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Automattic/markdown-database-integration
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Automattic/markdown-database-integration#424 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 78/100
Automattic/markdown-database-integration#420 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Automattic/markdown-database-integration#415 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 78/100
Automattic/markdown-database-integration#414 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
Automattic/markdown-database-integration#401 ·
Maintainers usually reply within 1 day
All issues in Automattic/markdown-database-integration
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
scanaislop/aislop#476 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
components-web-app/api-components-bundle#403 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
mollie/PrestaShop#1566 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
components-web-app/docs#193 ·
-
docs: add Python and PHP examples to docs/api.mdPossibly taken @gaurika-analyst claimed this today. Opendocumentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
djazairdev/wilayas#12 · 1 comment ·
Maintainers usually reply within 1 day