Skip to content

Add Git repository sync backend - #1475

Open
landeqiming666 wants to merge 1 commit into
shanalikhan:masterfrom
landeqiming666:add-git-repository-sync
Open

Add Git repository sync backend#1475
landeqiming666 wants to merge 1 commit into
shanalikhan:masterfrom
landeqiming666:add-git-repository-sync

Conversation

@landeqiming666

@landeqiming666 landeqiming666 commented Jul 15, 2026

Copy link
Copy Markdown

Short description of what this resolves:

Adds a Git repository backend for Settings Sync while preserving the existing GitHub Gist workflow.

Changes proposed in this pull request:

  • Add an isolated Git sync service that initializes the User folder, commits settings, and pushes or forcefully downloads a selected branch.
  • Add settings-page configuration for the sync backend, remote URL, and branch/profile, with local metadata excluded from commits.
  • Add local bare-repository integration tests covering upload, unchanged uploads, forced download, ignored metadata, and invalid branches.

The remote URL can point to GitHub, GitLab, an enterprise host, or a local repository. Authentication is delegated to the installed Git client. Automatic repository creation through provider APIs is not included in this first implementation.

Fixes: #413

How Has This Been Tested?

  • npm run vscode:prepublish
  • ./node_modules/.bin/tsc -p ./
  • ./node_modules/.bin/mocha out/test/service/gitSyncService/gitSyncService.test.js (4 passing)
  • git diff --check

The repository's full legacy Mocha bootstrap still requires a runtime vscode module that is unavailable from its deprecated test package; the new Git integration suite runs independently against real local repositories.

Screenshots (if appropriate):

Not included. The change adds three fields to the existing Sync Settings page and does not introduce a new screen.

Checklist:

  • I have read the contribution guidelines.
  • My change requires a change to the documentation and GitHub Wiki.
  • I have updated the documentation and Wiki accordingly.

IssueHunt Summary

Referenced issues

This pull request has been submitted to:


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.

1 participant