gitbutlerapp / gitbutler

The GitButler version control client, backed by Git, powered by Tauri/Rust/Svelte
https://gitbutler.com
Other
12.39k stars 487 forks source link

Something went wrong... & Merge conflict #4345

Open andrebaerlocher opened 1 month ago

andrebaerlocher commented 1 month ago

Version

0.12.9

Operating System

Mac OS X

Distribution Method

dmg (Apple Silicon)

Describe the issue

I had the following problems the last few times I tried working on a repo on a different device:

image
  1. On device 1 I pushed all my commits of 3 branches (visuelles, komponenten, daten), so every branch was clean
  2. On device 2 all commits were present, I worked on the 3 branches (offline, though)
  3. When I tried to commit the changes from device 2 I got an error in the Workspace "Something went wrong...", in the console:
    
    [Error] ipc->list_virtual_branches: {"projectId":"9dae42be-4456-4b05-9826-0e4a54aed589"} (2)
    Error: Merge conflict between base and "daten"
    Object

code: "errors.unknown"

message: "Merge conflict between base and \"daten\""

Object Prototype (anonymous function) (ipc.zofQMm0f.js:1:2373) [Warning] Error: Merge conflict between base and "daten" (Button.D8XivPza.js, line 3)



This is the second time this happened, at the first I thought I buggered up.

Also, there were suddenly more branches, now there are 4 (instead of 3), one was duplicated, apparently the one with the merge conflict.
<img width="767" alt="image" src="https://github.com/user-attachments/assets/5c633ecd-4b2e-4b1a-8b4a-552d3a3da37c">
<img width="767" alt="image" src="https://github.com/user-attachments/assets/c417e5d7-a8ff-4ec9-b148-ada4d49ff0b3">

I can't apply any of the branches.

### How to reproduce

1. Commit from device 1
2. Work from device 2 (not sure if you have to be offline or not)

### Expected behavior

- No error
- No merge conflict (or the possibility to resolve the merge conflict)

### Relevant log output

_No response_
Byron commented 1 month ago

Thanks for reporting!

I think the steps to reproduce won't suffice to actually reproduce the issue, and I lack the imagination to fill in the blanks based on the other information provided here. Maybe you can find a way to reliably reproduce the issue and write down the steps?

andrebaerlocher commented 1 month ago

Ok, I tried and I tried but couldn't reproduce it voluntarily. But, I wanted commit some changes this morning and it happened again, haven't even touched the other device in the meantime.

What I did this morning:

  1. Changes in various files
  2. One file was in the wrong branch
  3. Dragged the file into the other branch - nothing happened
  4. Tried again, perhaps three times - still nothing happened
  5. Discarded the changes in that file - nothing happened
  6. CMD & R
  7. Something went wrong... image

Okokok, YOU GUYS ARE AMAZING! After taking the screenshot I noticed I can undo steps, which I did and now it works again! Thank gods (oh, and you guys!)

Still problem persists, possibly because of the dragging and not working or the discarding the changes?

Byron commented 1 month ago

Thanks a lot for the additional details, maybe with these the issue can already be reproduced even though I didn't try it. If you should get into this state on an open-source project, then it might be easiest to zip it up and upload it here, as the issue should reproduce if it's an issue that can be undone with the project history.