[GH-ISSUE #870] [feature]: Sync Collections with Git repo #302

Open
opened 2026-03-16 14:26:24 +03:00 by kerem · 67 comments
Owner

Originally created by @sa- on GitHub (May 13, 2020).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/870

Is your feature request related to a problem? Please describe.
Would be nice to sync storage over git. My team runs into this problem with Postman and any other web request UI out there - that the web request collections are synced differently than our git repos. Why not just make storage git-friendly

Describe the solution you'd like
Jupyter notebooks do this well. Their UI is populated by a json file, and any interactions or change in state are stored back into that json format, making it play well with git. We should be able to JSON.stringify whatever needs to be stored and have this work like a web request "IDE".

EDIT: In order to flesh out a solution a little more, requests could be stored as .http files and follow https://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html

Originally created by @sa- on GitHub (May 13, 2020). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/870 **Is your feature request related to a problem? Please describe.** Would be nice to sync storage over git. My team runs into this problem with Postman and any other web request UI out there - that the web request collections are synced differently than our git repos. Why not just make storage git-friendly **Describe the solution you'd like** Jupyter notebooks do this well. Their UI is populated by a json file, and any interactions or change in state are stored back into that json format, making it play well with git. We should be able to JSON.stringify whatever needs to be stored and have this work like a web request "IDE". EDIT: In order to flesh out a solution a little more, requests could be stored as `.http` files and follow https://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html
Author
Owner

@liyasthomas commented on GitHub (May 13, 2020):

Syncing with GitHub repo feature is being requested a lot. Pinning this to roadmap 💯

<!-- gh-comment-id:627891268 --> @liyasthomas commented on GitHub (May 13, 2020): Syncing with GitHub repo feature is being requested a lot. Pinning this to roadmap :100:
Author
Owner

@ukslim commented on GitHub (Jun 29, 2020):

Please don't tie this feature to GitHub specifically. Allow it to use arbitrary git repositories. Some of us use Bitbucket. Some of us run self-hosted git servers.

<!-- gh-comment-id:651063460 --> @ukslim commented on GitHub (Jun 29, 2020): Please don't tie this feature to GitHub specifically. Allow it to use arbitrary git repositories. Some of us use Bitbucket. Some of us run self-hosted git servers.
Author
Owner

@zia-devsinc commented on GitHub (Oct 7, 2020):

Waiting eagerly for this feature

<!-- gh-comment-id:704769029 --> @zia-devsinc commented on GitHub (Oct 7, 2020): Waiting eagerly for this feature
Author
Owner

@mittalyashu commented on GitHub (Oct 8, 2020):

Maybe we can commit the connections inside the git repository with a dot folder like .hoppscotch and store collections inside it.

(👆 idea can fulfil this too https://github.com/hoppscotch/hoppscotch/issues/870#issuecomment-651063460)

<!-- gh-comment-id:705439348 --> @mittalyashu commented on GitHub (Oct 8, 2020): Maybe we can commit the connections inside the git repository with a dot folder like `.hoppscotch` and store collections inside it. (👆 idea can fulfil this too https://github.com/hoppscotch/hoppscotch/issues/870#issuecomment-651063460)
Author
Owner

@al3rez commented on GitHub (Oct 30, 2020):

I'm wiling to start this feature, it'd be nice if anyone can give more context. On how we're going to track requests in Git repositories. For example; through Oauth2 and third-parties? I quite new to this service so please enlighten me.

Thanks 🥋

<!-- gh-comment-id:719600206 --> @al3rez commented on GitHub (Oct 30, 2020): I'm wiling to start this feature, it'd be nice if anyone can give more context. On how we're going to track requests in Git repositories. For example; through Oauth2 and third-parties? I quite new to this service so please enlighten me. Thanks 🥋
Author
Owner

@liyasthomas commented on GitHub (Oct 30, 2020):

As of now, we've a GitHub Oauth app used for signing in to Hoppscotch using GitHub. This could be extended to implement Collections sync. But I too haven't done this before. If you could be of help, I'm all in to implement this.

Currently Collections (and History and Environments) are synced to Firebase as JSON arrays. Basic MVP should allow users to:

  1. Choose a repo from the list of all repos
  2. Write Collections to the selected repo
  3. Read Collections from selected repo
<!-- gh-comment-id:719618705 --> @liyasthomas commented on GitHub (Oct 30, 2020): As of now, we've a GitHub Oauth app used for signing in to Hoppscotch using GitHub. This could be extended to implement Collections sync. But I too haven't done this before. If you could be of help, I'm all in to implement this. Currently Collections (and History and Environments) are synced to Firebase as JSON arrays. Basic MVP should allow users to: 1. Choose a repo from the list of all repos 2. Write Collections to the selected repo 3. Read Collections from selected repo
Author
Owner

@gempir commented on GitHub (Oct 30, 2020):

That's not the point of a git integration. There should be zero oauth or authentication in general. The point is storing it in plaintext files that can be added to a git repository.

So ideally not binary blobs but nicely reviewable files something similar to .rest or .http files maybe https://www.jetbrains.com/help/idea/http-client-in-product-code-editor.html#creating-http-request-files

Although JSON Arrays as described above sound fine aswell. Decently human readable in codereview.

The UI could offer a basic commit and push functionality but I think the first goal should be having the option to chose a specific folder as the source of all requests.

History and other metadata might not be interesting to share so they should be separated.

The UI should refresh when files change, like when you do a git pull on the CLI.

<!-- gh-comment-id:719629375 --> @gempir commented on GitHub (Oct 30, 2020): That's not the point of a git integration. There should be zero oauth or authentication in general. The point is storing it in plaintext files that can be added to a git repository. So ideally not binary blobs but nicely reviewable files something similar to `.rest` or `.http` files maybe https://www.jetbrains.com/help/idea/http-client-in-product-code-editor.html#creating-http-request-files Although JSON Arrays as described above sound fine aswell. Decently human readable in codereview. The UI could offer a basic commit and push functionality but I think the first goal should be having the option to chose a specific folder as the source of all requests. History and other metadata might not be interesting to share so they should be separated. The UI should refresh when files change, like when you do a git pull on the CLI.
Author
Owner

@liyasthomas commented on GitHub (Oct 30, 2020):

I'm seeking a GitHub app starter kit with the basic CRUD implementations on a user/organization repo.

Edit: closed the issue by mistake.

<!-- gh-comment-id:719633426 --> @liyasthomas commented on GitHub (Oct 30, 2020): I'm seeking a GitHub app starter kit with the basic CRUD implementations on a user/organization repo. Edit: closed the issue by mistake.
Author
Owner

@gempir commented on GitHub (Oct 30, 2020):

Could be a good feature aswell but not at all what the issue creator was asking for I think. Imagine a corporate environment without any access to github.

<!-- gh-comment-id:719634856 --> @gempir commented on GitHub (Oct 30, 2020): Could be a good feature aswell but not at all what the issue creator was asking for I think. Imagine a corporate environment without any access to github.
Author
Owner

@liyasthomas commented on GitHub (Oct 30, 2020):

Well, almost all platforms (BitBucket, GitLab etc) has Oauth apps. I mentioned GitHub as a starting point for this feature. There's always scope for other platforms as well.

<!-- gh-comment-id:719636437 --> @liyasthomas commented on GitHub (Oct 30, 2020): Well, almost all platforms (BitBucket, GitLab etc) has Oauth apps. I mentioned GitHub as a starting point for this feature. There's always scope for other platforms as well.
Author
Owner

@gempir commented on GitHub (Oct 30, 2020):

Yes but why go through all that trouble if storing files in plaintext in a specific folder could already solve most of the issues.

Let the user handle persisting and syncing. They could put it in Google drive or Dropbox if they wanted to. Or like we discussed a git repo.

All the app has to do is detect changes and update the UI accordingly

<!-- gh-comment-id:719638416 --> @gempir commented on GitHub (Oct 30, 2020): Yes but why go through all that trouble if storing files in plaintext in a specific folder could already solve most of the issues. Let the user handle persisting and syncing. They could put it in Google drive or Dropbox if they wanted to. Or like we discussed a git repo. All the app has to do is detect changes and update the UI accordingly
Author
Owner

@liyasthomas commented on GitHub (Oct 30, 2020):

Got it. So whatever the platform of storage be (Google drive, Dropbox, Git repo etc), it's API access should allow us to sync data upon changes. A feature which sync collections irrespective of the choosen source.

@AndrewBastin wdys?

<!-- gh-comment-id:719641244 --> @liyasthomas commented on GitHub (Oct 30, 2020): Got it. So whatever the platform of storage be (Google drive, Dropbox, Git repo etc), it's API access should allow us to sync data upon changes. A feature which sync collections irrespective of the choosen source. @AndrewBastin wdys?
Author
Owner

@al3rez commented on GitHub (Oct 30, 2020):

I think it's always better to do it first and make it perfect later.

<!-- gh-comment-id:719700259 --> @al3rez commented on GitHub (Oct 30, 2020): I think it's always better to do it first and make it perfect later.
Author
Owner

@AndrewBastin commented on GitHub (Nov 1, 2020):

Well, I guess with the plans to update the store and global state system, we can figure out a way to emit a file.

But the actual challenge (Hoppscotch being a web app) is making and editing the files. The current web specs don't really implement a good solution for that. We can make the users download down a file, but not actually update and work with files in the background.

That is the case for local files.

For online (Git, Dropbox, Drive etc.) sync, it is pretty trivial. But we need to build up a good backend infrastructure to implement it properly. We are working on the backend infrastructure (for Teams, stay tuned for more info on that) and if that all goes on good, we could work on this down the road.

As far as I can think, these are the limitations and challenges on implementing a solution to this.

<!-- gh-comment-id:720016715 --> @AndrewBastin commented on GitHub (Nov 1, 2020): Well, I guess with the plans to update the store and global state system, we can figure out a way to emit a file. But the actual challenge (Hoppscotch being a web app) is making and editing the files. The current web specs don't really implement a good solution for that. We can make the users download down a file, but not actually update and work with files in the background. That is the case for local files. For online (Git, Dropbox, Drive etc.) sync, it is pretty trivial. But we need to build up a good backend infrastructure to implement it properly. We are working on the backend infrastructure (for Teams, stay tuned for more info on that) and if that all goes on good, we could work on this down the road. As far as I can think, these are the limitations and challenges on implementing a solution to this.
Author
Owner

@liyasthomas commented on GitHub (Nov 1, 2020):

Well, i did a bg check on how apps like draw.io does this. They and lotta other web apps are making use of Native File API for local files. This works well in most browsers now.

https://web.dev/file-system-access
https://wicg.github.io/file-system-access
https://developer.mozilla.org/en-US/docs/Web/API/FileSystem

If there's a emited file, I guess incorporating File system solves saving it to local dir. At the same time, Google Drive, Git repo etc are another thing.

As Andrew mentioned, current priority is set to releasing Teams support asap. And after that we can definitely work on improving syncing logic.

<!-- gh-comment-id:720017315 --> @liyasthomas commented on GitHub (Nov 1, 2020): Well, i did a bg check on how apps like draw.io does this. They and lotta other web apps are making use of Native File API for local files. This works well in most browsers now. https://web.dev/file-system-access https://wicg.github.io/file-system-access https://developer.mozilla.org/en-US/docs/Web/API/FileSystem If there's a emited file, I guess incorporating File system solves saving it to local dir. At the same time, Google Drive, Git repo etc are another thing. As Andrew mentioned, current priority is set to releasing Teams support asap. And after that we can definitely work on improving syncing logic.
Author
Owner

@AndrewBastin commented on GitHub (Nov 1, 2020):

@liyasthomas, pretty sure you checked the compat info for the Filesystem API. That is an old standard. But the new API is under an experiment flag for only Chrome.

draw.io AFAIK just uses the techniques even we are using right now in Hoppscotch actually. Saving initiates a download. We can open from a file in the normal form input means.

Here is the browser compat details on the new API: https://caniuse.com/native-filesystem-api

<!-- gh-comment-id:720017929 --> @AndrewBastin commented on GitHub (Nov 1, 2020): @liyasthomas, pretty sure you checked the compat info for the `Filesystem` API. That is an old standard. But the new API is under an experiment flag for only Chrome. draw.io AFAIK just uses the techniques even we are using right now in Hoppscotch actually. Saving initiates a download. We can open from a file in the normal form input means. Here is the browser compat details on the new API: https://caniuse.com/native-filesystem-api
Author
Owner

@liyasthomas commented on GitHub (Nov 1, 2020):

I did, and we might need a legacy polyfill too, for implementing it as of now. 😁

<!-- gh-comment-id:720018038 --> @liyasthomas commented on GitHub (Nov 1, 2020): I did, and we might need a legacy polyfill too, for implementing it as of now. 😁
Author
Owner

@al3rez commented on GitHub (Nov 10, 2020):

https://github.com/char0n/http-request-in-editor

<!-- gh-comment-id:724998852 --> @al3rez commented on GitHub (Nov 10, 2020): https://github.com/char0n/http-request-in-editor
Author
Owner

@liyasthomas commented on GitHub (Dec 9, 2020):

Users logged in with GitHub can now create secret gist of their Collections and Environments. Also allows importing both from a gist URL.

<!-- gh-comment-id:741517700 --> @liyasthomas commented on GitHub (Dec 9, 2020): Users logged in with `GitHub` can now create secret gist of their Collections and Environments. Also allows importing both from a gist URL.
Author
Owner

@lanphan commented on GitHub (Mar 17, 2021):

@liyasthomas
I just download and try Hoppscotch, already created 2 collections + 3 environment set, found this and tried Github sync as your comment said (already login Github, authorized and enabled 3 sync: history, collection and environment), but I found some issues below:

  1. I don't see any new Gist in my github acc
  2. All my history, collection and environment are empty now
<!-- gh-comment-id:800733407 --> @lanphan commented on GitHub (Mar 17, 2021): @liyasthomas I just download and try Hoppscotch, already created 2 collections + 3 environment set, found this and tried Github sync as your comment said (already login Github, authorized and enabled 3 sync: history, collection and environment), but I found some issues below: 1. I don't see any new Gist in my github acc 2. All my history, collection and environment are empty now
Author
Owner

@liyasthomas commented on GitHub (Mar 17, 2021):

Hi @lanphan creating gist is not an automatic process. We respect your privacy and you should manually create secret gist of collections.

  1. Open Import / Export in Collections sidebar
  2. Click options menu
  3. Click create secret gist

Screenshot_20210317-074825__01__01

This is exactly not the way this should work. We'll be automating this stuffs with sync feature. You can essentially toggle a switch from settings and everything works under the hood. This proof of concept will be refactored. Please be patient while we work on this feature. Meanwhile follow our public project board to track progress: https://github.com/hoppscotch/hoppscotch/projects/6

Thanks.

<!-- gh-comment-id:800743006 --> @liyasthomas commented on GitHub (Mar 17, 2021): Hi @lanphan creating gist is not an automatic process. We respect your privacy and you should manually create secret gist of collections. 1. Open Import / Export in Collections sidebar 2. Click options menu 3. Click create secret gist ![Screenshot_20210317-074825__01__01](https://user-images.githubusercontent.com/10395817/111404839-78661e80-86f5-11eb-86b7-70560324a8f4.jpg) This is exactly not the way this should work. We'll be automating this stuffs with sync feature. You can essentially toggle a switch from settings and everything works under the hood. This proof of concept will be refactored. Please be patient while we work on this feature. Meanwhile follow our public project board to track progress: https://github.com/hoppscotch/hoppscotch/projects/6 Thanks.
Author
Owner

@andrestone commented on GitHub (Apr 1, 2021):

Isn't the original issue about having some sort of format to store collections and their state, so these can be subject to version control?

I think that having a standard / portable format would enable a lot of great things. It would be amazing to iterate using the GUI, then consume the requests defined in the collections programmatically on CI.

Maybe this is already supported and I can't find it?

<!-- gh-comment-id:812184203 --> @andrestone commented on GitHub (Apr 1, 2021): Isn't the original issue about having some sort of format to store collections and their state, so these can be subject to version control? I think that having a standard / portable format would enable a lot of great things. It would be amazing to iterate using the GUI, then consume the requests defined in the collections programmatically on CI. Maybe this is already supported and I can't find it?
Author
Owner

@liyasthomas commented on GitHub (Apr 2, 2021):

We're working on a totally new state system (which is already implemented on some pages - #1560) and revamped collections protocol that would eventually solve this issue. Which allow us to version control collections and most importantly "Teams collaboration" with version control. And sync with gist or a JSON file was part of a proof of concept. Down the line as we work on https://github.com/hoppscotch/hoppscotch/projects/6, we'll addressing this issue and give prime focus.

Thanks for the suggestions, will let you know when this is resolved. Feel free to contribute to the project.

<!-- gh-comment-id:812278893 --> @liyasthomas commented on GitHub (Apr 2, 2021): We're working on a totally new state system (which is already implemented on some pages - #1560) and revamped collections protocol that would eventually solve this issue. Which allow us to version control collections and most importantly "Teams collaboration" with version control. And sync with gist or a JSON file was part of a proof of concept. Down the line as we work on https://github.com/hoppscotch/hoppscotch/projects/6, we'll addressing this issue and give prime focus. Thanks for the suggestions, will let you know when this is resolved. Feel free to contribute to the project.
Author
Owner

@andrestone commented on GitHub (Apr 2, 2021):

Thank you for the info.

It still feels like having a file protocol for collections is a separate issue. IMHO, synchronizing workspaces is a feature that might make use of the file protocol, but not necessarily.

<!-- gh-comment-id:812397300 --> @andrestone commented on GitHub (Apr 2, 2021): Thank you for the info. It still feels like having a file protocol for collections is a separate issue. IMHO, synchronizing workspaces is a feature that might make use of the file protocol, but not necessarily.
Author
Owner

@wouthoekstra commented on GitHub (Nov 16, 2021):

The solution that is being worked on (https://github.com/hoppscotch/hoppscotch/projects/6) suggests a single folder where all workspaces have to be stored in. Would it still allow for multiple projects to be stored in several places? For me the biggest advantage of having the collection be stored wherever I want would be that it would be possible to store the collection within the projects repository.

This would allow the collections status to be directly tied to the projects version. If I check out a branch in git (or vcs for that matter), where one of my colleagues created some new API endpoints, the collection could immediately reflect the new endpoints. If I check out the latest released branch, I would return to see just the endpoints that are released.

With one central workspace folder there is more mental load to store the collections for endpoints other than the latest released APIs, especially when you have to work on multiple projects.

<!-- gh-comment-id:970278133 --> @wouthoekstra commented on GitHub (Nov 16, 2021): The solution that is being worked on (https://github.com/hoppscotch/hoppscotch/projects/6) suggests a single folder where all workspaces have to be stored in. Would it still allow for multiple projects to be stored in several places? For me the biggest advantage of having the collection be stored wherever I want would be that it would be possible to store the collection within the projects repository. This would allow the collections status to be directly tied to the projects version. If I check out a branch in git (or vcs for that matter), where one of my colleagues created some new API endpoints, the collection could immediately reflect the new endpoints. If I check out the latest released branch, I would return to see just the endpoints that are released. With one central workspace folder there is more mental load to store the collections for endpoints other than the latest released APIs, especially when you have to work on multiple projects.
Author
Owner

@AndrewBastin commented on GitHub (Nov 16, 2021):

@wouthoekstra The Github Project boards we are using are really outdated and we have backtracked on the implementation plans discussed on that. We want to focus on a more robust implementation in which you can actually write your Hoppscotch collections as a file (kinda like an export, but not exactly) and work off on that so we don't exactly worry about the Git aspect of the things.

But before getting into this, we have two major blockers:

  • We wanted to actually our UX around collections and workspaces in a way multiple sources (like personal collections, team collections and (when this lands) file based collections) are cleanly expressed to the user. (cc: @liyasthomas)

  • To provide a good user experience for this feature while still being a web app, we want proper support for the File System Access API which hasn't landed yet on non-Chromium browsers (our compat policy for features requires support for Chrome, Firefox and Safari (atleast their latest stable versions)). To counteract this and other browser issues/restrictions, there is active effort internally to build a native app (meanwhile maintaining our performance standards) which allows us to bypass that wait, but that is also a work in progress and won't be done soon.

We will update this thread accordingly once this actually gets into proper progress.

@liyasthomas can you look into the project boards ?

<!-- gh-comment-id:970664986 --> @AndrewBastin commented on GitHub (Nov 16, 2021): @wouthoekstra The Github Project boards we are using are really outdated and we have backtracked on the implementation plans discussed on that. We want to focus on a more robust implementation in which you can actually write your Hoppscotch collections as a file (kinda like an export, but not exactly) and work off on that so we don't exactly worry about the Git aspect of the things. But before getting into this, we have two major blockers: - We wanted to actually our UX around collections and workspaces in a way multiple sources (like personal collections, team collections and (when this lands) file based collections) are cleanly expressed to the user. (cc: @liyasthomas) - To provide a good user experience for this feature while still being a web app, we want proper support for the [File System Access](https://web.dev/file-system-access/) API which hasn't landed yet on non-Chromium browsers (our compat policy for features requires support for Chrome, Firefox and Safari (atleast their latest stable versions)). To counteract this and other browser issues/restrictions, there is active effort internally to build a native app (meanwhile maintaining our performance standards) which allows us to bypass that wait, but that is also a work in progress and won't be done soon. We will update this thread accordingly once this actually gets into proper progress. @liyasthomas can you look into the project boards ?
Author
Owner

@liyasthomas commented on GitHub (Nov 16, 2021):

I've deleted the existing project board, it has been stale for a very long time, and our roadmap has been changed quite a lot.

Once we have a proper UX of the way users switch collections context from personal to team/organization, syncing with multiple providers like git/file can be taken into consideration. Watch this space for updates.

<!-- gh-comment-id:970687264 --> @liyasthomas commented on GitHub (Nov 16, 2021): I've deleted the existing project board, it has been stale for a very long time, and our roadmap has been changed quite a lot. Once we have a proper UX of the way users switch collections context from personal to team/organization, syncing with multiple providers like git/file can be taken into consideration. Watch this space for updates.
Author
Owner

@wpggles commented on GitHub (Apr 11, 2022):

Sometimes I'm working in LAN with my teams , so I'm very interested in this feature (like self-hosted authorization and storage) . Any progress on this one ? Have roadmap or plan list ?

<!-- gh-comment-id:1094613164 --> @wpggles commented on GitHub (Apr 11, 2022): Sometimes I'm working in LAN with my teams , so I'm very interested in this feature (like self-hosted authorization and storage) . Any progress on this one ? Have roadmap or plan list ?
Author
Owner

@jalberto commented on GitHub (May 24, 2022):

Just to clarify, right now the only way to store/sync collections is to use Hopscotch sync service, that uses Firebase.

Is that right?

If so, how safe are sensitive data in the collections or environment?

As I understand this request the goal is to have a single place in the local system to store everything, and then is up to the user to use that location in dropbox, git or foo

<!-- gh-comment-id:1136051250 --> @jalberto commented on GitHub (May 24, 2022): Just to clarify, right now the only way to store/sync collections is to use Hopscotch sync service, that uses Firebase. Is that right? If so, how safe are sensitive data in the collections or environment? As I understand this request the goal is to have a single place in the local system to store everything, and then is up to the user to use that location in dropbox, git or foo
Author
Owner

@karelbilek commented on GitHub (Feb 3, 2023):

This would be a killer feature that would literally made me switch from Postman

<!-- gh-comment-id:1415674746 --> @karelbilek commented on GitHub (Feb 3, 2023): This would be a killer feature that would literally made me switch from Postman
Author
Owner

@isaiahdahl commented on GitHub (Jul 27, 2023):

There still any life in this feature? I'm definitely interested.

<!-- gh-comment-id:1654119658 --> @isaiahdahl commented on GitHub (Jul 27, 2023): There still any life in this feature? I'm definitely interested.
Author
Owner

@massimeddu-sj commented on GitHub (Sep 22, 2023):

This is also the single feature preventing my team to use this great tool.

<!-- gh-comment-id:1731644946 --> @massimeddu-sj commented on GitHub (Sep 22, 2023): This is also the single feature preventing my team to use this great tool.
Author
Owner

@federicorosso1993 commented on GitHub (Oct 12, 2023):

this would be great and the only thing that, while I'm trying this app, is really missing from this.
Basically I think it as
I got
1 collection (my current project)->multiple rest call.
open one->modify it->save
It will automatically export to my local git repository so that I can push it to any git compatible repository.

Right now I can do it manually, but it is just not the same.
The main problem I think it is that right now there is no Desktop app to do that (so you cannot really export anything to my local folders automatically) so you need to support each cloud platform individually).

<!-- gh-comment-id:1759963147 --> @federicorosso1993 commented on GitHub (Oct 12, 2023): this would be great and the only thing that, while I'm trying this app, is really missing from this. Basically I think it as I got 1 collection (my current project)->multiple rest call. open one->modify it->save It will automatically export to my local git repository so that I can push it to any git compatible repository. Right now I can do it manually, but it is just not the same. The main problem I think it is that right now there is no Desktop app to do that (so you cannot really export anything to my local folders automatically) so you need to support each cloud platform individually).
Author
Owner

@Aeolun commented on GitHub (Nov 14, 2023):

There is now a desktop app to do this :)

<!-- gh-comment-id:1809394789 --> @Aeolun commented on GitHub (Nov 14, 2023): There is now a desktop app to do this :)
Author
Owner

@federicorosso1993 commented on GitHub (Nov 14, 2023):

There is now a desktop app to do this :)

I tried it but it crash on startup, not sure why...

<!-- gh-comment-id:1809677171 --> @federicorosso1993 commented on GitHub (Nov 14, 2023): > There is now a desktop app to do this :) I tried it but it crash on startup, not sure why...
Author
Owner

@xzycn commented on GitHub (Nov 14, 2023):

There is now a desktop app to do this :)

I tried it but it crash on startup, not sure why...

It's a bug, you can watch #3524 .

<!-- gh-comment-id:1809848370 --> @xzycn commented on GitHub (Nov 14, 2023): > > There is now a desktop app to do this :) > > I tried it but it crash on startup, not sure why... It's a bug, you can watch #3524 .
Author
Owner

@LaSylv commented on GitHub (Nov 16, 2023):

https://github.com/hoppscotch/hoppscotch/issues/870#issuecomment-1809394789

How to do this with the desktop app ?

Can't find anything :/

<!-- gh-comment-id:1814084637 --> @LaSylv commented on GitHub (Nov 16, 2023): https://github.com/hoppscotch/hoppscotch/issues/870#issuecomment-1809394789 How to do this with the desktop app ? Can't find anything :/
Author
Owner

@1Mark commented on GitHub (Nov 22, 2023):

#870 (comment)

How to do this with the desktop app ?

Can't find anything :/

Let me clarify. It is a PWA. It can be installed via
image

However, that was a response to

There is now a desktop app to do this :)

this would be great and the only thing that, while I'm trying this app, is really missing from this. Basically I think it as I got 1 collection (my current project)->multiple rest call. open one->modify it->save It will automatically export to my local git repository so that I can push it to any git compatible repository.

Right now I can do it manually, but it is just not the same. The main problem I think it is that right now there is no Desktop app to do that (so you cannot really export anything to my local folders automatically) so you need to support each cloud platform individually).

Claiming that there is no desktop app - which may have been true then - not important.

TL;DR Desktop app or not, there is still no support for git integration

<!-- gh-comment-id:1823047544 --> @1Mark commented on GitHub (Nov 22, 2023): > [#870 (comment)](https://github.com/hoppscotch/hoppscotch/issues/870#issuecomment-1809394789) > > How to do this with the desktop app ? > > Can't find anything :/ Let me clarify. It is a PWA. It can be installed via ![image](https://github.com/hoppscotch/hoppscotch/assets/15360245/e0de6b77-56b3-4346-9f4c-79820e4bc361) However, that was a response to > There is now a desktop app to do this :) > this would be great and the only thing that, while I'm trying this app, is really missing from this. Basically I think it as I got 1 collection (my current project)->multiple rest call. open one->modify it->save It will automatically export to my local git repository so that I can push it to any git compatible repository. > > Right now I can do it manually, but it is just not the same. The main problem I think it is that right now there is no Desktop app to do that (so you cannot really export anything to my local folders automatically) so you need to support each cloud platform individually). Claiming that there is no desktop app - which may have been true then - not important. **TL;DR Desktop app or not, there is still no support for git integration**
Author
Owner

@Bigua commented on GitHub (Dec 10, 2023):

Since this seems that wil take some time, I've migrated to usebruno, they have support to save all colections in plain text on a folder who can be synced via git.

<!-- gh-comment-id:1849028569 --> @Bigua commented on GitHub (Dec 10, 2023): Since this seems that wil take some time, I've migrated to usebruno, they have support to save all colections in plain text on a folder who can be synced via git.
Author
Owner

@1Mark commented on GitHub (Dec 10, 2023):

Since this seems that wil take some time, I've migrated to usebruno, they have support to save all colections in plain text on a folder who can be synced via git.

Great. Thanks for letting us know.

<!-- gh-comment-id:1849040318 --> @1Mark commented on GitHub (Dec 10, 2023): > Since this seems that wil take some time, I've migrated to usebruno, they have support to save all colections in plain text on a folder who can be synced via git. Great. Thanks for letting us know.
Author
Owner

@karelbilek commented on GitHub (Dec 18, 2023):

( @Bigua do thank you, I didn't know about usebruno :P )

<!-- gh-comment-id:1859870665 --> @karelbilek commented on GitHub (Dec 18, 2023): ( @Bigua _do_ thank you, I didn't know about usebruno :P )
Author
Owner

@lauhon commented on GitHub (Jan 18, 2024):

This is basically the only thing missing for me to pitch my employer to use hoppscotch for all of their API testing and documentation. Really would love to see this coming! :)

@Bigua - how can your usebruno integration be used, is there documentation somewhere?

<!-- gh-comment-id:1898231405 --> @lauhon commented on GitHub (Jan 18, 2024): This is basically the only thing missing for me to pitch my employer to use hoppscotch for all of their API testing and documentation. Really would love to see this coming! :) @Bigua - how can your usebruno integration be used, is there documentation somewhere?
Author
Owner

@Bigua commented on GitHub (Jan 25, 2024):

This is basically the only thing missing for me to pitch my employer to use hoppscotch for all of their API testing and documentation. Really would love to see this coming! :)

@Bigua - how can your usebruno integration be used, is there documentation somewhere?

Sadly the doc there its incipient , so you can do this tinkering with the app, I personally don't use it with integrations

<!-- gh-comment-id:1910230186 --> @Bigua commented on GitHub (Jan 25, 2024): > This is basically the only thing missing for me to pitch my employer to use hoppscotch for all of their API testing and documentation. Really would love to see this coming! :) > > @Bigua - how can your usebruno integration be used, is there documentation somewhere? Sadly the doc there its incipient , so you can do this tinkering with the app, I personally don't use it with integrations
Author
Owner

@a-super-admin commented on GitHub (Feb 16, 2024):

Hi, Great tool.
The original issue poster (https://github.com/hoppscotch/hoppscotch/issues/1309#issue-733576400) from 4 years ago, and me and dozens of other fans of this app just wanted to have the persistance to be on a filesystem. Especially when you do self-hosting, wanting to store, sync (maybe sensitive) collections on our own disk, easily adoptable with a docker mount. I don't understand it yet, we can only persist collections on 3rd party cloud services/VCSs?
I just need the json blob that sits in the browser local storage to be read/written from/to disk, everything else like syncing, git push, pull etc is then up to the maintainer. Am I missing something?
Thank you!

<!-- gh-comment-id:1949125519 --> @a-super-admin commented on GitHub (Feb 16, 2024): Hi, Great tool. The original issue poster (https://github.com/hoppscotch/hoppscotch/issues/1309#issue-733576400) from 4 years ago, and me and dozens of other fans of this app just wanted to have the persistance to be on a filesystem. Especially when you do self-hosting, wanting to store, sync (maybe sensitive) collections on our own disk, easily adoptable with a docker mount. I don't understand it yet, we can only persist collections on 3rd party cloud services/VCSs? I just need the json blob that sits in the browser local storage to be read/written from/to disk, everything else like syncing, git push, pull etc is then up to the maintainer. Am I missing something? Thank you!
Author
Owner

@equiman commented on GitHub (Mar 15, 2024):

I would like to propose an MVP solution on this:

  • Hoppscotch save collections locally using the same JSON format used on export collections (and show this location to the user)
  • User create a repository on the same path where the JSON collection and env files are located
  • User made CRUD operations with Git (GitHub/Gitlab/Bitbucket... or whatever) using (put/pull/commit... etc.) commands
  • Hoppscotch only need to attach a process to check if file change and sync it with the client

Would it be possible?

The responsibility will fall on the user whether or not to update these files. But also, it will give us the opportunity to use all the git benefits to use different like branching and versioning and the most important use a private repository to not expose sensitive information.

<!-- gh-comment-id:2000596588 --> @equiman commented on GitHub (Mar 15, 2024): I would like to propose an MVP solution on this: - **Hoppscotch** save collections locally using the same JSON format used on export collections (and show this location to the user) - **User** create a repository on the same path where the JSON collection and env files are located - **User** made CRUD operations with Git (GitHub/Gitlab/Bitbucket... or whatever) using (put/pull/commit... etc.) commands - **Hoppscotch** only need to attach a process to check if file change and sync it with the client Would it be possible? The responsibility will fall on the user whether or not to update these files. But also, it will give us the opportunity to use all the git benefits to use different like **branching and versioning** and the most important use a **private repository to not expose sensitive information**.
Author
Owner

@nazimuddintbasha commented on GitHub (May 29, 2024):

Looks like lot of interest shown for the Git Sync feature but don't see any movement. I see few of them chipped in with the ideas. I really appreciate the community members striving for new features. Any thoughts on how we get this feature roll out?

<!-- gh-comment-id:2138173393 --> @nazimuddintbasha commented on GitHub (May 29, 2024): Looks like lot of interest shown for the Git Sync feature but don't see any movement. I see few of them chipped in with the ideas. I really appreciate the community members striving for new features. Any thoughts on how we get this feature roll out?
Author
Owner

@pavel-suhakou commented on GitHub (Jul 13, 2024):

They don’t want to do it, use Bruno instead.

<!-- gh-comment-id:2227046976 --> @pavel-suhakou commented on GitHub (Jul 13, 2024): They don’t want to do it, use Bruno instead.
Author
Owner

@hemachandsai commented on GitHub (Aug 13, 2024):

Exactly bruno has this feature, i will try it

<!-- gh-comment-id:2285858610 --> @hemachandsai commented on GitHub (Aug 13, 2024): Exactly bruno has this feature, i will try it
Author
Owner

@ImNicolasTheDev commented on GitHub (Dec 4, 2024):

Hi there ! After more than 4 years, this is still a highly requested feature.
One solution could be, in the Options tab, to have multiple fields to configure Git syncing. This would allow, not only for Github repo sync, but also for private repos, Gitlab repos...
The only thing is to find a git client to be able to interact with it.

The process could be like so :

  • First, setup the git configuration in the Options (+ a ckeckbox should be available to automatically sync with git when Hoppscotch starts)

  • Then some buttons appear, like "Sync with Git" => clicking it will automatically pull and import the requests and environments json (it will only change the requests and envs with the same id, without deleting other things if the user have other requests for example.)
    💡 An idea would be to make it like requests and envs stored in git have unique ids (like add git in the id : git1a2b3c4d). A problem that could appear is that if a new git repo containing requests is pulled, and locally the user have a request with the same id, the local request would be overwritten.

  • Then, after you synced (pulled) the new repo, the button changes to "Push changes", which stays grey until you modify any request / variable. Let's say we modified a variable in a request. We can now click on "Push changes", which will first make a new window appear which contains :

    • An input to either enter a commit message (or not)
    • A dropdown menu to select the branch we want to commit to (With an option to create a new branch, so a new input appears to enter the name of the branch)
    • 2 buttons : "Cancel" and "Push"
      (The git client will first pull changes if any, merge them if everything's fine, and then commit and push)
      And now the user successfully pushed the modifications to Github, Gitlab... ! 😄

BUT, THERE ARE ANNOYING CASES :

  • First, if two users are modifying the same things (a specific variable, the url of a request, a part of the request's body, could be anything) at the same time. The 1st one pushes changes, no problem. But then, when the 2nd user tries to push the modifications, he encounter an error.
    💡 Hoppscotch could display a window containing mutiple things :

    • First, some context like "Please resolve the conflicts before pushing the modifications".
    • Then, 2 windows :
      • On the left, the list of modifications pushed to git and that causes conflicts
      • On the right, a checkbox that when checked, overwrite the local version, and keep the git version. For strings (variables, body, urls...) conflicts, there could be an input to edit the local version. This input should contain by default the local version of it, and the user could edit it.
    • The status, like "All conflicts resolved !", "Still {1} conflict left."
    • 2 buttons : "Cancel" and "Save" (the button "Save" should only be clickable when all conflicts are resolved. When clicked, it goes back to the initial "Push changes window").
  • Second annoying case is, if the user hasn't used Hoppscotch in a while and has the "automatically sync with git" option checked (so it's activated), and has unpushed modifications locally. When he will start Hoppscotch, and the pull action happens, there's going to be merge conflicts.

💡 A solution could be to reuse the "Merge conflicts" window !

  • Third annoying case : if the user click on "Sync with git" after he has made some modifications : 2 cases :
    • There's no merge conflicts, so the pull action completes successfully
    • There's a merge conflict, and in this case, we could also reuse the "Merge conflicts" window.

That's all I could think about GIT integration in Hoppscotch!
@liyasthomas do you think it's something that could be prioritized since this feature is highly requested?

Oh, and all of the things mentioned above are just some ideas, feel free to give me some feedback, and to add some ideas too! This is how we can move the feature forward 😉

<!-- gh-comment-id:2517482810 --> @ImNicolasTheDev commented on GitHub (Dec 4, 2024): Hi there ! After more than 4 years, this is still a highly requested feature. One solution could be, in the Options tab, to have multiple fields to configure Git syncing. This would allow, not only for Github repo sync, but also for private repos, Gitlab repos... The only thing is to find a git client to be able to interact with it. The process could be like so : - First, setup the git configuration in the Options (+ a ckeckbox should be available to automatically sync with git when Hoppscotch starts) - Then some buttons appear, like "Sync with Git" => clicking it will automatically pull and import the requests and environments json (it will only change the requests and envs with the same id, without deleting other things if the user have other requests for example.) 💡 An idea would be to make it like requests and envs stored in git have unique ids (like add `git` in the id : `git1a2b3c4d`). A problem that could appear is that if a new git repo containing requests is pulled, and locally the user have a request with the **same id**, the local request would be overwritten. - Then, after you synced (pulled) the new repo, the button changes to "Push changes", which stays grey until you modify any request / variable. Let's say we modified a variable in a request. We can now click on "Push changes", which will first make a new window appear which contains : - An input to either enter a commit message (or not) - A dropdown menu to select the branch we want to commit to (With an option to create a new branch, so a new input appears to enter the name of the branch) - 2 buttons : "Cancel" and "Push" (The git client will first pull changes if any, merge them if everything's fine, and then commit and push) And now the user successfully pushed the modifications to Github, Gitlab... ! 😄 **BUT, THERE ARE ANNOYING CASES :** - First, if two users are modifying the same things (a specific variable, the url of a request, a part of the request's body, could be anything) at the same time. The 1st one pushes changes, no problem. But then, when the 2nd user tries to push the modifications, he encounter an error. 💡 Hoppscotch could display a window containing mutiple things : - First, some context like "Please resolve the conflicts before pushing the modifications". - Then, 2 windows : - On the left, the list of modifications pushed to git and that causes conflicts - On the right, a checkbox that when checked, overwrite the local version, and keep the git version. For strings (variables, body, urls...) conflicts, there could be an input to edit the local version. This input should contain by default the local version of it, and the user could edit it. - The status, like "All conflicts resolved !", "Still {1} conflict left." - 2 buttons : "Cancel" and "Save" (the button "Save" should only be clickable when all conflicts are resolved. When clicked, it goes back to the initial "Push changes window"). - Second annoying case is, if the user hasn't used Hoppscotch in a while and has the "automatically sync with git" option checked (so it's activated), and has unpushed modifications locally. When he will start Hoppscotch, and the pull action happens, there's going to be merge conflicts. 💡 A solution could be to reuse the "Merge conflicts" window ! - Third annoying case : if the user click on "Sync with git" after he has made some modifications : 2 cases : - There's no merge conflicts, so the pull action completes successfully - There's a merge conflict, and in this case, we could also reuse the "Merge conflicts" window. That's all I could think about GIT integration in Hoppscotch! @liyasthomas do you think it's something that could be prioritized since this feature is highly requested? Oh, and all of the things mentioned above are just some ideas, feel free to give me some feedback, and to add some ideas too! This is how we can move the feature forward 😉
Author
Owner

@bruno-lopes commented on GitHub (Jan 29, 2025):

This would be a really nice feature. After performing some changes, the user should inform Hoppscotch that it would like to push the changes. Hoppscotch should create a new branch, and automatically start a pull request / merge request to the main branch. When the merge occurs and this "feature branch" is destroyed, Hoppscotch identifies those changes and automatically updates local collection.

<!-- gh-comment-id:2621786619 --> @bruno-lopes commented on GitHub (Jan 29, 2025): This would be a really nice feature. After performing some changes, the user should inform Hoppscotch that it would like to push the changes. Hoppscotch should create a new branch, and automatically start a pull request / merge request to the main branch. When the merge occurs and this "feature branch" is destroyed, Hoppscotch identifies those changes and automatically updates local collection.
Author
Owner

@jasine commented on GitHub (Feb 28, 2025):

+1

<!-- gh-comment-id:2689774927 --> @jasine commented on GitHub (Feb 28, 2025): +1
Author
Owner

@deidei1216 commented on GitHub (Mar 21, 2025):

+1

<!-- gh-comment-id:2742047165 --> @deidei1216 commented on GitHub (Mar 21, 2025): +1
Author
Owner

@xeon-zolt commented on GitHub (Mar 26, 2025):

+1

<!-- gh-comment-id:2755196211 --> @xeon-zolt commented on GitHub (Mar 26, 2025): +1
Author
Owner

@lamongabriel commented on GitHub (Apr 24, 2025):

+1

<!-- gh-comment-id:2827582298 --> @lamongabriel commented on GitHub (Apr 24, 2025): +1
Author
Owner

@dungmv commented on GitHub (Jun 4, 2025):

upvote

<!-- gh-comment-id:2938765933 --> @dungmv commented on GitHub (Jun 4, 2025): upvote
Author
Owner

@cvionnet commented on GitHub (Jun 20, 2025):

+1

<!-- gh-comment-id:2990869666 --> @cvionnet commented on GitHub (Jun 20, 2025): +1
Author
Owner

@ccxnu commented on GitHub (Jul 29, 2025):

+1

<!-- gh-comment-id:3130270400 --> @ccxnu commented on GitHub (Jul 29, 2025): +1
Author
Owner

@ducvuongpham commented on GitHub (Aug 19, 2025):

+1

<!-- gh-comment-id:3198941715 --> @ducvuongpham commented on GitHub (Aug 19, 2025): +1
Author
Owner

@weirdo-adam commented on GitHub (Aug 27, 2025):

+1

<!-- gh-comment-id:3226848780 --> @weirdo-adam commented on GitHub (Aug 27, 2025): +1
Author
Owner

@samkellerhals commented on GitHub (Sep 12, 2025):

+1

<!-- gh-comment-id:3285003529 --> @samkellerhals commented on GitHub (Sep 12, 2025): +1
Author
Owner

@fschein commented on GitHub (Sep 16, 2025):

+1

<!-- gh-comment-id:3299102113 --> @fschein commented on GitHub (Sep 16, 2025): +1
Author
Owner

@giancarlomsoares commented on GitHub (Sep 16, 2025):

+1

<!-- gh-comment-id:3299123793 --> @giancarlomsoares commented on GitHub (Sep 16, 2025): +1
Author
Owner

@pedrosimao commented on GitHub (Oct 1, 2025):

+1

<!-- gh-comment-id:3355033880 --> @pedrosimao commented on GitHub (Oct 1, 2025): +1
Author
Owner

@liudonghua123 commented on GitHub (Oct 30, 2025):

+1

<!-- gh-comment-id:3465986483 --> @liudonghua123 commented on GitHub (Oct 30, 2025): +1
Author
Owner

@Maizi12 commented on GitHub (Dec 16, 2025):

+1

<!-- gh-comment-id:3661578651 --> @Maizi12 commented on GitHub (Dec 16, 2025): +1
Author
Owner

@maifeeulasad commented on GitHub (Dec 25, 2025):

We can do something like this:

  • detect if the environment has git or not
  • if we are in a git environment, we will render a button to save the data, and additional commit message, by default can be some typecal commit message with timestamp
  • and we have already swagger export import option, so we don't have to worry about custom export or import, and swagger is the de-facto industry standard already

let me know your opinion. And I am willing to work on this one, please assign this to me.

<!-- gh-comment-id:3691013523 --> @maifeeulasad commented on GitHub (Dec 25, 2025): We can do something like this: - detect if the environment has git or not - if we are in a git environment, we will render a button to save the data, and additional commit message, by default can be some typecal commit message with timestamp - and we have already swagger export import option, so we don't have to worry about custom export or import, and swagger is the de-facto industry standard already let me know your opinion. **And I am willing to work on this one, please assign this to me.**
Author
Owner

@martin-lysk commented on GitHub (Jan 22, 2026):

feat: git repository sync for collections #5797 tackles this, its still WIP so we (I am a co-author of the pr) would love to hear your thoughts

<!-- gh-comment-id:3785548887 --> @martin-lysk commented on GitHub (Jan 22, 2026): [feat: git repository sync for collections #5797](https://github.com/hoppscotch/hoppscotch/pull/5797) tackles this, its still WIP so we (I am a co-author of the pr) would love to hear your thoughts
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#302
No description provided.