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

Can't force push as long as a commit is different from the remote #5659

Open
LovesAsuna opened this issue Nov 25, 2024 · 12 comments
Open

Can't force push as long as a commit is different from the remote #5659

LovesAsuna opened this issue Nov 25, 2024 · 12 comments
Labels
bug Something isn't working

Comments

@LovesAsuna
Copy link

LovesAsuna commented Nov 25, 2024

Version

0.13.17

Operating System

macOS

Distribution Method

dmg (Apple Silicon)

Describe the issue

image

If the virtual branch is not committed, but there is only one diff to the remote branch, you can't force a commit.

How to reproduce

No response

Expected behavior

No response

Relevant log output

No response

@LovesAsuna LovesAsuna added the bug Something isn't working label Nov 25, 2024
@Byron Byron added the feedback requested Feedback was requested to help resolve the issue label Nov 25, 2024
@Byron
Copy link
Collaborator

Byron commented Nov 25, 2024

Thanks a lot for reporting!

Is it correct that the issue is that the remote has a commit that isn't in the local branch, yet the UI offers to force push?
If so, I'd expect to be able to 'fast-forward' the local branch to this location, or in some way adopt the remote commit.

@LovesAsuna
Copy link
Author

The problem is that I just want to force push, but actually clicking the button doesn't respond

@LovesAsuna
Copy link
Author

However, force push will work when there are actual commits on the local branch, i.e., it's not a full fast forward.

@Byron
Copy link
Collaborator

Byron commented Nov 25, 2024

Thanks for the clarification.

Could you see if there are any errors in the console of the UI (Cmd + Shift + i), or in the logs?

Thanks again.

@LovesAsuna
Copy link
Author

there is no log in the console of the UI

@Byron
Copy link
Collaborator

Byron commented Nov 25, 2024

Thank you. I assume the file-based logs are empty as well?
Usually, if something goes wrong after pressing a button, there is an error popup. So nothing happening without console log (UI) might mean the logic is confused so maybe it doesn't try anything?

@LovesAsuna
Copy link
Author

This problem is actually fairly easy to reproduce. Simply create a new branch, push a random commit, then uncommit and disard the changes and force push

@Byron
Copy link
Collaborator

Byron commented Nov 25, 2024

I followed these instructions and it did force-push which worked as expected.

The only hope here is to find ERROR lines in the application logs.

@LovesAsuna
Copy link
Author

you can see my screen recording at https://wormhole.app/ezvAB#dsC83J41BayXE_kt8A8RXA

@Byron
Copy link
Collaborator

Byron commented Nov 26, 2024

Thank you, I have re-uploaded the video here for ease-of-use.

2024-11-26.10.23.49.mov

It's interesting that the push seems to finish, without error, yet nothing happens.

Note that the application logs are different from the console log in the UI, and there might be something else to see there. In theory, failures to push should show up visible in the UI, but maybe that's not working so the only hint will be in the application logs?

@LovesAsuna
Copy link
Author

It seems that there are only info-level logs
GitButler.2024-11-26.log

@Byron Byron removed the feedback requested Feedback was requested to help resolve the issue label Nov 26, 2024
@Byron
Copy link
Collaborator

Byron commented Nov 26, 2024

Thank you - it really seems like the force-push goes through even though it has no effect on the UI. When repeating what i see in the video, it also just works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants