fix(git-sync): set upstream tracking on push for new/empty repos [INS-2625]#10163
Open
fiosman wants to merge 2 commits into
Open
fix(git-sync): set upstream tracking on push for new/empty repos [INS-2625]#10163fiosman wants to merge 2 commits into
fiosman wants to merge 2 commits into
Conversation
✅ Circular References ReportGenerated at: 2026-06-26T14:10:45.250Z Summary
Click to view all circular references in PR (9)Click to view all circular references in base branch (9)Analysis✅ No Change: This PR does not introduce or remove any circular references. This report was generated automatically by comparing against the |
Contributor
There was a problem hiding this comment.
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.
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.
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 withThere 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.