question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

15reactions
sanjaygupta1011commented, Mar 3, 2020

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.

1reaction
shiftkeycommented, Aug 10, 2018

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Git error on git pull (unable to update local ref) - Stack Overflow
My team and I ran into this error, unable to update local ref, when doing a pull in SourceTree. Update 2020: Per @Edward...
Read more >
Unable to solve constant "Unable to update local ref" issues
This often happens to me when I click on the Pull button while Sourcetree is apparently automatically fetching. The message is: "error: cannot...
Read more >
Error git pull fails unable to resolve reference ... - Edureka
When I run a simple git pull command, I get this error: unable to resolve reference refs/remotes/origin.
Read more >
Git Error: (unable to update local ref) | by Gabriel A. Quiles-Pérez
After a quick search in google I found the solution. It seems that this error is caused due to a loose commit.
Read more >
Git Error On Git Pull (Unable To Update Local Ref) - ADocLib
Explanation: It appears your remote repo (in Github / bitbucket) branches were removed ,though your local references were not updated and pointing to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found