Skip to content

Wiki sync via git remote #7

Description

@aniongithub

Summary

Async sync of wiki pages to an online git store (e.g. GitHub Wiki repo) so a single wiki can span multiple machines.

Why it works

  • Pages are plain .md files — git is the natural sync transport
  • The SQLite index (.mind-map.db) is disposable — rebuilt by Reindex() from the filesystem
  • Per-page MCP boundaries mean conflicts are rare: each mutation targets a single path

Proposed approach

  • New internal/sync/ package with GitSync struct
  • Track dirty pages after each MCP write via an onChange callback on the wiki engine
  • Background goroutine: git pull → check conflicts → reindex → git push on an interval
  • Conflict resolution: keep both versions (page.CONFLICT.md), log a warning
  • CLI flags: --sync-remote <url>, --sync-interval <duration>

Design doc

See the wiki page: projects/mind-map-sync

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions