gitbutlerapp / gitbutler

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

Got duplicated commit when checkout PR #4145

Open peam1146 opened 3 months ago

peam1146 commented 3 months ago

Version

0.12.5

Operating System

Mac OS X

Distribution Method

dmg (Apple Silicon)

Describe the issue

When I apply remote branch to workflow I got duplicated commits in my local git and be forced to force push. Every time that I delete and reapply I got new duplicated commit SHA. I have try reproduce this in GitButler repo but I can't

How to reproduce

apply some PR CleanShot 2567-06-21 at 18 36 47

Expected behavior

Have only remote commits

Relevant log output

No response

Byron commented 3 months ago

Thanks a lot for reporting, and for the video, too!

There definitely is a lot going on when applying vbranches and maybe this is a side-effect of that. I hope there is a way to reproduce it reliably - maybe it's something related to the commit-graph that is unusual, so if the pattern would be reproduced in an example repository, maybe the whole issue would be reproducible and could be shared here?

peam1146 commented 3 months ago

I'm not sure if this is related or not. I found this PR on the GitButler repo. https://github.com/gitbutlerapp/gitbutler/pull/4133 Is this supposed have both local and remote commits? CleanShot 2567-06-22 at 12 41 23

peam1146 commented 3 months ago

Thanks a lot for reporting, and for the video, too!

There definitely is a lot going on when applying vbranches and maybe this is a side-effect of that. I hope there is a way to reproduce it reliably - maybe it's something related to the commit-graph that is unusual, so if the pattern would be reproduced in an example repository, maybe the whole issue would be reproducible and could be shared here?

I'm sorry that I can't say much about my commit graph because it's an internal project. I'll try to reproduce in different ways if I can.

Byron commented 3 months ago

I'm not sure if this is related or not. I found this PR on the GitButler repo. #4133 Is this supposed have both local and remote commits? CleanShot 2567-06-22 at 12 41 23 CleanShot 2567-06-22 at 12 41 23

It does seem strange that after applying, it's a new commit. Maybe because it was rebased or altered in some other way. If that would have happened, commit duplication might happen as well, but I am too far out of my expertise to know for sure.

MitchTalmadge commented 1 month ago

This happens to me too. It's the main reason I must quit using GitButler for now. Unfortunately like OP I cannot share specifics of the graph. But the process is the exact same:

Could it be related to commit signing? I do sign my commits.