Skip to content

feat(Git Sync): Add support for canonical repository output#9739

Draft
gatzjames wants to merge 1 commit intoKong:developfrom
gatzjames:feat/git-repo-output
Draft

feat(Git Sync): Add support for canonical repository output#9739
gatzjames wants to merge 1 commit intoKong:developfrom
gatzjames:feat/git-repo-output

Conversation

@gatzjames
Copy link
Contributor

Overview

Prior to this work, Insomnia stored its git repositories with a layout that was internal to the app and invisible to standard Git tooling:

{userData}/version-control/git/{repoId}/
  git/          ← git internals (non-standard folder name)
  other/        ← all non-Insomnia files
  (Insomnia YAML files existed only in the NeDB database — never on disk)

This prevented users from running any native Git command (git log, git diff, git rebase, VSCode source-control, etc.) against a cloned repository, even though the data was conceptually a real Git repo. It also made it impossible to integrate Insomnia repositories into broader developer workflows.

Goals

  • Native Git compatibility — The repository on disk must be a first-class Git repository that any Git client can operate against without any knowledge of Insomnia internals.

  • Bidirectional sync — Changes made inside Insomnia (new requests, environment edits, etc.) must appear as real file changes on disk. Changes made on disk (native git pull, merge, rebase, VSCode edits) must be reflected in the Insomnia UI and database.

  • Zero data loss migration — Existing cloned repositories must be migrated silently and safely, without any action from the user.

  • Correctness under concurrency — The sync loop must not produce duplicate writes, import loops, or data corruption when both Insomnia and native Git are operating near-simultaneously.

  • Scope — The modern project-scoped code path (GitProjectNeDBClient) is the target. The legacy workspace-scoped path (NeDBClient / .insomnia/ directory) is left unchanged for backward compatibility.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants