Kong / insomnia

The open-source, cross-platform API client for GraphQL, REST, WebSockets, SSE and gRPC. With Cloud, Local and Git storage.
https://insomnia.rest
Apache License 2.0
34.63k stars 1.96k forks source link

Git Sync Issue on Windows #3810

Open BaderMarkus opened 3 years ago

BaderMarkus commented 3 years ago

Problem We added the Git Sync facility to our project and created an .insomnia folder in the root directory of our Git repository. Under Linux, synchronisation works without any problems, but under Windows the branch cannot be changed.

To Reproduce

  1. Create -> Git Clone
  2. Go to Branches -> Checkout other Branch (in our case development)
  3. Pull changes

Expected behavior The expected behaviour is that the current changes are loaded from the new branch or the branch is changed.

Error grafik

Stacktrace

MergeNotSupportedError: Merges with conflicts are not supported yet.
    at _merge (C:\Users\Finabro\AppData\Local\insomnia\app-2021.4.1\resources\app.asar\node_modules\isomorphic-git\index.cjs:8677:11)
    at async _pull (C:\Users\Finabro\AppData\Local\insomnia\app-2021.4.1\resources\app.asar\node_modules\isomorphic-git\index.cjs:8831:5)
    at async Object.pull (C:\Users\Finabro\AppData\Local\insomnia\app-2021.4.1\resources\app.asar\node_modules\isomorphic-git\index.cjs:11119:12)
    at async GitSyncDropdown._handlePull (file:///C:/Users/Finabro/AppData/Local/insomnia/app-2021.4.1/resources/app.asar/bundle.js:412669:13)

Operating System:

ryanholden8 commented 2 years ago

Experiencing this same issue. Can't fix since rolling back to remove the merge conflict is also not working (#3057).

kreosus commented 2 years ago

Hi @BaderMarkus

Have you tried our latest release located here: https://github.com/Kong/insomnia/releases

BaderMarkus commented 1 year ago

@kreosus my setup has changed in the meantime a little bit (using now Linux) - but I face the same issue with the version Insomnia 2022.7.0-beta.3 Here is the additional information: Version: Insomnia 2022.7.0-beta.3 Build date: 10/20/2022 OS: Linux x64 5.15.0-10050-tuxedo Electron: 19.0.3 Node: 16.14.2 V8: 10.2.154.4-electron.0 Architecture: x64

nbolton commented 1 year ago

Also seeing the "Merges with conflicts are not supported yet." message but it looks like that's coming from a dependancy: https://github.com/isomorphic-git/isomorphic-git/blob/d72cf9160cfeb17ae0a566263d184da06562db0d/src/errors/MergeNotSupportedError.js#L5

I want to sync in the changes from another computer, but I don't care about resolving conflicts. I guess if we handle this error case and provide a "Force pull" button or "Use remote changes" button, that'd give people a workaround until isomorphic-git implements merge conflicts.

Without this, I can't see how I would pull down my changes... I'm kind of stuck. The only alternative seems to be to delete the document and re-add my git credentials (which is fiddly).

DorisEckel8412 commented 1 year ago

Hi, also seeing this problem when pulling. My team don't even care about resolving, we need something like a force-pull like nbolton mentioned.

ryanholden8 commented 1 year ago