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.

error: cannot lock ref 'refs/remotes/origin/

See original GitHub issue

It only happens a few times

error: cannot lock ref 'refs/remotes/origin/jetty-9.4.x': is at d8e0f8df1206536612c938b63ae677d2352de14b but expected ddd80deeb96eed136029b944258b36b285af79c6
From github.com:eclipse/jetty.project
 ! ddd80deeb9..d8e0f8df12  jetty-9.4.x -> origin/jetty-9.4.x  (unable to update local ref)
 * [new branch]            jetty-9.4.x-2828-http2_connection_listener_contention -> origin/jetty-9.4.x-2828-http2_connection_listener_contention

image

Version 1.3.3 $ git --version git version 2.18.0 macOS 10.13.6

Issue Analytics

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

github_iconTop GitHub Comments

287reactions
zhzoocommented, Aug 19, 2018

On windows, happens to me nearly every time. Same exact error as you: error: cannot lock ‘ref/remotes/origin/blahblahblah’: is at something but expected somethingelse

Hacky workaround I’ve been doing is a combination of: running: git gc --prune=now and deleteing .git/refs/remote/origin

163reactions
arpitgupta19commented, Jun 6, 2019

This worked for me : git remote prune origin

Read more comments on GitHub >

github_iconTop Results From Across the Web

git pull fails "unable to resolve reference ... - Stack Overflow
Error: cannot lock ref" simply means information in /refs are corrupted and Git cannot continue to create index.
Read more >
Git pull fails - Unable to resolve reference refs/remotes/origin ...
Accepted Answer - 1 ... To fix this error, remove the following file YOURPROJECT/.git/refs/remotes/origin/master , and then run git fetch to download it...
Read more >
“error: cannot lock ref” – what to do? - LinuxPip
"error: cannot lock ref" simply means information in /refs are corrupted and Git cannot continue to create index.lock file. What the error looks ......
Read more >
Git “error: cannot lock ref” error | Technical Feeder
The following error occurred in my environment when I executed git pull . error: cannot lock ref 'refs/remotes/origin/branch-name': is at ...
Read more >
Git - Unable to resolve reference 'refs/remotes/origin/master'
A git pull and hits the below "reference broken" error message? Terminal. $ git pull error: cannot lock ref 'refs/remotes/origin/master': unable ...
Read more >

github_iconTop Related Medium Post

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