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

Desktop client automatically fast-forwarding current branch #8933

Open
jayrhynas opened this issue Jan 16, 2020 · 16 comments
Open

Desktop client automatically fast-forwarding current branch #8933

jayrhynas opened this issue Jan 16, 2020 · 16 comments
Labels
investigation-needed Likely bugs, but haven't been reliably reproduced by a reviewer

Comments

@jayrhynas
Copy link

Describe the bug

The GitHub desktop app seems to be automatically fetching and fast-forwarding the current branch, even if there are local changes. This results in git reporting many "diffs" that would undo the remote changes, since the unchanged working directory doesn't match the branch tip.

This seems to be a regression of #8155.

Version & OS

Version 2.2.4
macOS 10.15.2

Steps to reproduce the behavior

  1. Clone a repo on machine A from some remote
  2. Push changes to the remote from machine B
  3. Focus the GitHub desktop client and wait for the auto-fetch to run.

Expected behavior

Changes are fetched in the background but the current branch isn't affected.

Actual behavior

Changes are fetched and the current branch is fast-forwarded (if possible). This results in git reporting many "diffs" that would undo the remote changes, since the unchanged working directory doesn't match the branch tip.

@billygriffin
Copy link
Contributor

@jayrhynas Thanks for the issue, and I'm sorry you're experiencing this. Does it seem to manifest in the same way as the reports in #8155, or is there anything different in your case from those reports?

Would you mind including a log file (Help -> Show Logs in Finder) from a day this occurred for you?

@billygriffin billygriffin added the more-info-needed The submitter needs to provide more information about the issue label Jan 16, 2020
@jayrhynas
Copy link
Author

jayrhynas commented Jan 16, 2020

It seems to be the same as #8155.
I've attached the logs from today (I just redacted the username since this is from my co-worker's machine)
2020-01-16.desktop.production.log

The issue occurred around 11:00-12:30 EST (16:00-17:30 UTC)

@liran-co
Copy link

liran-co commented Mar 5, 2020

+1 Having this issue as well.

@steveward
Copy link
Member

@liran-co would you be able to upload your log file from GitHub Desktop as well (from the day this issue occurred)? I'd like to take a look to see if there is anything helpful there.

@jayrhynas and @liran-co I would also be interested if you are able to reliably reproduce this in a test repository (if you have the time to). I've made attempts to try and trigger this edge case but so far have been unsuccessful. There may be a detail I'm missing in the reproduction steps.

@jayrhynas
Copy link
Author

I haven't been able to reproduce it intentionally but it happens multiple times a week to multiple co-workers.

@liran-co
Copy link

liran-co commented Mar 6, 2020

Log file below. I think it's safe to ignore all the authentication errors in there (not sure why they are in the logs...I'm authenticated just fine). For me this is happening nearly every time a remote branch is updated.

2020-03-06.desktop.production.log

@tierninho
Copy link
Contributor

In the logs it says:

Host key verification failed.
fatal: Could not read from remote repository.

which usually indicates an issue with SSH -- did you clone this repository in GitHub Desktop, or did you clone it from another client using SSH? You can check the remote URL the repository is using from GitHub Desktop by going to the file menu and selecting Repository > Repository Settings > Remote.

There are two solutions:

  1. Switch the remote URL to use HTTPS instead of SSH.

  2. Get SSH working. The host key verification failed error means that the host key isn't in your known_hosts file, with ssh-keyscan [enter_host] >> ~/.ssh/known_hosts.

Hope that helps. Let us know if that doesn't get things working.

@liran-co
Copy link

liran-co commented Mar 7, 2020

Yea, that did it (had an old repo in there with SSH). In any case, this happened again today around 2020-03-07T15:52. Log file attached.

2020-03-07.desktop.production.log

@tierninho
Copy link
Contributor

@liran-co Please confirm if it is happening with the same repo or another repo. Also, which solution did you use to initially resolve it? Thanks.

@liran-co
Copy link

I switched the remote to HTTPS to solve those authentication issues. That wasn't the repo with the issue though.

@tierninho
Copy link
Contributor

Did HTTPS not resolve the issue when it happened again? Thanks in advance for the clarity.

@liran-co
Copy link

No, it did not. As a possibility helpful note: I did notice it happens pretty consistently when switching repos in the desktop app.

@outofambit outofambit added the investigation-needed Likely bugs, but haven't been reliably reproduced by a reviewer label Mar 12, 2020
@steveward
Copy link
Member

@jayrhynas and @liran-co could you share how many branches you have in the repository where you are seeing this issue occur? We think the issue may be related to having 20+ branches in a repository.

@liran-co
Copy link

28 branches :/

@jayrhynas
Copy link
Author

Also ~100 branches for me

@jayrhynas
Copy link
Author

Also ~100 branches for me

Would the issue be resolved by removing the local branches but keeping the remote ones? That would be a quicker solution for us.

@niik niik removed the more-info-needed The submitter needs to provide more information about the issue label Oct 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigation-needed Likely bugs, but haven't been reliably reproduced by a reviewer
Projects
None yet
Development

No branches or pull requests

7 participants