Skip to content

fix(git-sync): set upstream tracking on push for new/empty repos [INS-2625]#10163

Open
fiosman wants to merge 2 commits into
developfrom
fix/ins-2625
Open

fix(git-sync): set upstream tracking on push for new/empty repos [INS-2625]#10163
fiosman wants to merge 2 commits into
developfrom
fix/ins-2625

Conversation

@fiosman

@fiosman fiosman commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Addresses INS-2625. When linking a git sync project to a new empty repo, the repo is set up via isomorphic-git git.init() which does not set upstream tracking branch. When successfully pushing a new design document to the repo via the desktop app, then navigating to git cli, a native git pull fails with There is no tracking information for the current branch.

The fix is to set upstream tracking on the first successful push. It only happens if there is no remote tracking branch configured. This will fix scenarios where this happens in the future as well as existing scenarios where users linked a empty repo when creating a git sync project.

Copilot AI review requested due to automatic review settings June 25, 2026 15:24
@fiosman fiosman changed the title fix(git-sync): set upstream tracking on push for new repos [INS-2625] fix(git-sync): set upstream tracking on push for new/empty repos [INS-2625] Jun 25, 2026
@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown

✅ Circular References Report

Generated at: 2026-06-26T14:10:45.250Z
Status: ✅ NO CHANGE

Summary

Metric Base (develop) PR Change
Total Circular References 9 9 0 (0.00%)
Click to view all circular references in PR (9)
insomnia-inso/src/db/models/types.ts -> insomnia-inso/src/db/types.ts
insomnia/src/main/prompt-bridge.ts -> insomnia/src/main/window-utils.ts -> insomnia/src/main/plugin-window.ts
insomnia/src/main/window-utils.ts -> insomnia/src/main/plugin-window.ts
insomnia/src/network/network.ts -> insomnia-scripting-environment/src/objects/index.ts -> insomnia-scripting-environment/src/objects/collection.ts -> insomnia-scripting-environment/src/objects/response.ts
insomnia/src/network/network.ts -> insomnia/src/common/render.ts
insomnia/src/ui/components/settings/import-export.tsx -> insomnia/src/ui/components/modals/export-requests-modal.tsx
insomnia/src/ui/components/tabs/tab-list.tsx -> insomnia/src/ui/components/tabs/tab.tsx
insomnia/src/ui/components/templating/tag-editor-arg-sub-form.tsx -> insomnia/src/ui/components/templating/external-vault/external-vault-form.tsx
insomnia/src/ui/components/viewers/response-viewer.tsx -> insomnia/src/ui/components/viewers/response-multipart-viewer.tsx
Click to view all circular references in base branch (9)
insomnia-inso/src/db/models/types.ts -> insomnia-inso/src/db/types.ts
insomnia/src/main/prompt-bridge.ts -> insomnia/src/main/window-utils.ts -> insomnia/src/main/plugin-window.ts
insomnia/src/main/window-utils.ts -> insomnia/src/main/plugin-window.ts
insomnia/src/network/network.ts -> insomnia-scripting-environment/src/objects/index.ts -> insomnia-scripting-environment/src/objects/collection.ts -> insomnia-scripting-environment/src/objects/response.ts
insomnia/src/network/network.ts -> insomnia/src/common/render.ts
insomnia/src/ui/components/settings/import-export.tsx -> insomnia/src/ui/components/modals/export-requests-modal.tsx
insomnia/src/ui/components/tabs/tab-list.tsx -> insomnia/src/ui/components/tabs/tab.tsx
insomnia/src/ui/components/templating/tag-editor-arg-sub-form.tsx -> insomnia/src/ui/components/templating/external-vault/external-vault-form.tsx
insomnia/src/ui/components/viewers/response-viewer.tsx -> insomnia/src/ui/components/viewers/response-multipart-viewer.tsx

Analysis

No Change: This PR does not introduce or remove any circular references.


This report was generated automatically by comparing against the develop branch.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a Git sync interoperability issue where repositories initialized via isomorphic-git (e.g., when linking to an empty remote) can lack upstream tracking configuration, causing native Git CLI operations like git pull to fail due to missing tracking info.

Changes:

  • After a successful push, attempts to configure upstream tracking for the current branch when tracking is missing.
  • Adds unit tests to validate upstream tracking config is created on first successful push and not overwritten when a non-origin upstream is present.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/insomnia/src/sync/git/git-vcs.ts Adds post-push logic to set branch.<name>.remote/merge when upstream tracking is missing.
packages/insomnia/src/sync/git/tests/git-vcs.test.ts Adds push-related tests for upstream tracking setup and non-clobbering behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/insomnia/src/sync/git/git-vcs.ts
Comment thread packages/insomnia/src/sync/git/__tests__/git-vcs.test.ts
@fiosman fiosman requested a review from gatzjames June 26, 2026 14:17
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.

2 participants