feat(Git Sync): Add support for canonical repository output#9739
Draft
gatzjames wants to merge 1 commit intoKong:developfrom
Draft
feat(Git Sync): Add support for canonical repository output#9739gatzjames wants to merge 1 commit intoKong:developfrom
gatzjames wants to merge 1 commit intoKong:developfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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.