Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to find a branch #5800

Open
dchaniel opened this issue Dec 10, 2024 · 3 comments
Open

Failed to find a branch #5800

dchaniel opened this issue Dec 10, 2024 · 3 comments
Labels
bug Something isn't working UI Any broken visuals like layouts, colors etc.

Comments

@dchaniel
Copy link

Version

0.14.3

Operating System

macOS

Distribution Method

dmg (Apple Silicon)

Describe the issue

I wanted to apply a branch I was working on yesterday, so I searched for the branch in the gitbutler UI. I cannot find it anywhere but in the "PRs" section and it shows up only a "Apply from fork" button
image

I click that and then I get this error
image

Where the remote is my normal remote

Clicking confirm gives me this error

image

How to reproduce

I'm not sure why this happened as other branches are working fine.

Expected behavior

Expected behavior: This branch should show up. It shows up in github and it shows up when I just switch to the branch normally. It is definitely not deleted either locally or on the remote.

Relevant log output

No response

@dchaniel dchaniel added the bug Something isn't working label Dec 10, 2024
@Byron Byron added the UI Any broken visuals like layouts, colors etc. label Dec 10, 2024
@Byron
Copy link
Collaborator

Byron commented Dec 10, 2024

Thanks a lot for reporting!

It looks like the error is due to it trying to add a new remote as origin even though that does already exist.
Since I am so unfamiliar with this feature and wouldn't know how to reproduce the issue, let me bring in the big guns: @krlvi :) .

@dchaniel
Copy link
Author

dchaniel commented Dec 17, 2024

Just to note I'm seeing a potentially related error - I am trying to switch to a branch I haven't worked on in a while, and I can't find it in gitbutler. I moved to the branch manually (success) and still can't find in gitbutler. I also restarted gitbutler, and also rebased the branch on the latest main so it would potentially show up as newer.

I don't have a way of re-adding this branch so I just won't use gitbutler for this feature but it's unfortunate since I really like my gitbutler workflow!

@Byron
Copy link
Collaborator

Byron commented Dec 17, 2024

I don't have a way of re-adding this branch so I just won't use gitbutler for this feature but it's unfortunate since I really like my gitbutler workflow!

That really is unfortunate and it seems that the branch aggregation that happens in the background is a bit aggressive. Maybe there is still some virtual branch which somehow shadows or blocks the branch you actually want.

Can you find the name of the branch you are interested in (just the filename, for instance) in the .git/gitbutler/virtual_branches.toml file? If so, could you list the full branch name that you are looking for, i.e. refs/heads/<name> and the parts of the virtual_branches.toml file that seem to refer to it?

With that maybe it's possible to reproduce the issue locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working UI Any broken visuals like layouts, colors etc.
Projects
None yet
Development

No branches or pull requests

2 participants