mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[PR #5797] feat: git repository sync for collections #5358
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#5358
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/5797
Author: @NilsJacobsen
Created: 1/22/2026
Status: 🔄 Open
Base:
main← Head:main📝 Commits (2)
a8a9a80feat: add git sync for collections (WIP)e711374feat: unapplied changes indicator📊 Changes
13 files changed (+2129 additions, -16 deletions)
View changed files
📝
packages/hoppscotch-common/package.json(+2 -0)📝
packages/hoppscotch-common/src/components.d.ts(+1 -0)📝
packages/hoppscotch-common/src/components/collections/Collection.vue(+190 -1)📝
packages/hoppscotch-common/src/components/collections/ImportExport.vue(+43 -1)📝
packages/hoppscotch-common/src/components/collections/index.vue(+36 -1)➕
packages/hoppscotch-common/src/components/importExport/ImportExportSteps/GitFolderImport.vue(+137 -0)➕
packages/hoppscotch-common/src/helpers/import-export/import/import-sources/GitSource.ts(+49 -0)📝
packages/hoppscotch-common/src/modules/dioc.ts(+6 -0)📝
packages/hoppscotch-common/src/services/persistence/index.ts(+157 -3)➕
packages/hoppscotch-common/src/services/versioned-fs.service.ts(+513 -0)📝
packages/hoppscotch-selfhost-web/package.json(+1 -0)📝
packages/hoppscotch-selfhost-web/vite.config.ts(+9 -0)📝
pnpm-lock.yaml(+985 -10)📄 Description
PR: Git Repository Sync for Collections
Issue Reference
Working on closing #870 - Sync Collections with Git repo
Problem: Teams need to sync API request collections with Git repositories to version control collections alongside code.
Demo Video
New capabilities
✅ Connect to local git repository
✅ Switch branches to integrate in workflows
✅ Bidirectional Sync between IDE (local git) and Hoppscotch in the browser
Opportunity
This creates an easy way to handle git inside the browser. Which leads to close gaps between Hoppscotch and other code first API tools like https://www.usebruno.com/.
Architecture Diagramm
What's changed
I added Legit because it's open source, simple and I think it's a perfect fit for git sync at hoppscotch.
Services
versioned-fs.service.ts: Core service managing legitFs operationsComponents
GitFolderImport.vue: Modal for selecting local Git repositoryCollection.vue: Git collection indicators (branch icon, branch name, unapplied changes dot)ImportExport.vue: Integration with import/export systemindex.vue: Window focus sync handlerPersistence
persistence/index.ts: Bidirectional sync logicConfiguration
vite.config.ts: Added Node.js polyfills for browser compatibilityCurrent limitations
I would be happy to resolve those issues when you like the approach.
rest-collections.jsonfile. Best case this should be multiple files so it is also browsable in code.Still think that this could really be an enabler for engineering workflows.
I would love to get feedback on this proposal and hear if that is going in the right direction.
Summary by cubic
Add Git repository sync for collections with branch switching and bidirectional local sync. Teams can connect a local repo and version collections alongside code.
New Features
Dependencies
Written for commit
e7113747df. Summary will update on new commits.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.