Skip to content

unable to update local ref error on first Pull for every repo #5328

Closed

Description

@photonstorm

Description

When I open GitHub Desktop I start by pulling down several repos (all hosted on GitHub). Since update 1.3.2 I now consistently get an error window pop-up with the following content (obviously the repo and delta count varies each time, but the end result is always the same)

remote: Counting objects: 117, done.        
remote: Compressing objects:   3% (1/26)           
[snipped for brevity]
remote: Compressing objects: 100% (26/26), done.        
Receiving objects:   0% (1/117)   
Receiving objects:   1% (2/117)   
Receiving objects:  45% (53/117)   
remote: Total 117 (delta 98), reused 110 (delta 91), pack-reused 0        
Receiving objects:  46% (54/117)   
[snipped for brevity]
Receiving objects: 100% (117/117), 22.94 KiB | 7.65 MiB/s, done.
Resolving deltas:   0% (0/98)   
[snipped for brevity]
Resolving deltas:  94% (93/98)   
Resolving deltas: 100% (98/98), completed with 30 local objects.
error: cannot lock ref 'refs/remotes/origin/master': is at fc0dc1393039da99c24b165a868444429a591cf6 but expected 0967bfcab4d5f8671783696c67065431fb5d35ba
From https://github.com/photonstorm/phaser
 ! 0967bfcab..fc0dc1393  master     -> origin/master  (unable to update local ref)

This only happens once, the first time I try to pull. If I dismiss the error, then click Pull again, it works.

Version

  • GitHub Desktop: 1.3.2
  • Operating system: Windows 10

Steps to Reproduce

Launch GitHub Desktop. Click 'Pull' on any repo.

Expected Behavior

For it to pull down without an error window.

Actual Behavior

See above.

Additional Information

It's not too much of a problem because I can just click Pull a second time and it'll work fine. It happens whenever I launch GitHub Desktop. So if I close it down, make a commit from the command line, open Desktop and try to pull, the first one will error.

It has only started happening with 1.3.2 or the previous version, but definitely not before.

Logs

Activity

  1. natros commented on Aug 6, 2018

    @natros

    same problem here with macos
    $ git --version
    git version 2.18.0

  2. bschaeublin commented on Aug 7, 2018

    @bschaeublin

    Same Problem on Windows 10, with Github Desktop version 1.3.2. It's irritating and suggests that something is wrong with the repository.

  3. shiftkey commented on Aug 7, 2018

    @shiftkey
    Member

    Thanks for the feedback, everyone. I think this is related to the new background fetching we added in 1.3.0, and this might be a side-effect of trying to fetch the same repository twice (both when it's active and in the background).

    I'm going to move this into 1.3.3 and see if I can confirm this still occurs with the latest changes on master.

  4. self-assigned this
    on Aug 7, 2018
  5. added
    investigation-needed
    on Aug 7, 2018
  6. added this to the 1.3.3 milestone on Aug 7, 2018
  7. shiftkey commented on Aug 10, 2018

    @shiftkey
    Member

    I'm going to mark this as resolved for 1.3.3 and add it to the QA process to confirm for when we publish the beta on Monday.

  8. JustinK1973 commented on Aug 19, 2018

    @JustinK1973

    Hi, I still get this issue with 1.3.3 update about 50% of the time.

  9. mattacosta commented on Aug 20, 2018

    @mattacosta

    I saw this error again too. Only once though, and it was after pulling from a non-github repo.

  10. added
    bug
    priority-2
    and removed
    investigation-needed
    on Nov 9, 2018
  11. shiftkey commented on Nov 9, 2018

    @shiftkey
    Member

    Reopening this because I believe that #6141 is the proper solution

  12. Rohit221990 commented on Jan 8, 2019

    @Rohit221990

    There is local solution for this issue.

    Go to .git directory of your solution and follow below steps:

    1. .git/FETCH_HEAD :- find out you branch name in the FETCH_HEAD file and replace the latest ref id of your branch.
  13. modified the milestones: 1.3.3, 1.6.1 on Jan 16, 2019
  14. sanjaygupta1011 commented on Mar 3, 2020

    @sanjaygupta1011

    You need to update the reference using following Git command on Git bash:
    $ git update-ref -d refs/remotes/origin/[locked branch name]
    then pull using $git pull

    [locked branch name] is the name of the branch that the error is happening because of mismatch of commit Ids.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugpriority-2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions