Skip to content

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

Closed

Description

@natros

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

Activity

  1. zhzoo commented on Aug 19, 2018

    @zhzoo

    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

  2. iAmWillShepherd commented on Aug 27, 2018

    @iAmWillShepherd
    Contributor

    Thanks for taking the time to open an issue! 🙇

    This error is often a symptom of more than one process trying to act on the same repository at the same time.

    @natros could you verify if you are using other tools to manage your repository while Desktop is open (some IDEs and text editors have git plugins that may access your repository)?

    cc @desktop/support

  3. added
    more-info-needed
    on Aug 27, 2018
  4. natros commented on Aug 27, 2018

    @natros
    Author

    hi,

    i'm not using other tools, just using this to keep up to date with last changes from a few repositories. the one that most often is causing me problems is this repo:

    (jetty-9.4.x) git remote -v
    origin	[email protected]:eclipse/jetty.project.git (fetch)
    origin	[email protected]:eclipse/jetty.project.git (push)
    

    and this happens right now

    error: cannot lock ref 'refs/remotes/origin/jetty-9.4.x': is at 5b5f2fcf5f8241dd9edb998b97ad5e6cd45130a8 but expected 33a1367325530ec38254a279abb30946505af485
    From github.com:eclipse/jetty.project
     ! 33a1367325..5b5f2fcf5f  jetty-9.4.x -> origin/jetty-9.4.x  (unable to update local ref)
    error: cannot lock ref 'refs/remotes/origin/jetty-9.3.x': is at 29d466e7046bfd2c67d50194a606ed5276a6c8f9 but expected bd143a674ba7fbb3c7e7e450c8102e9a4bd95172
     ! bd143a674b..29d466e704  jetty-9.3.x -> origin/jetty-9.3.x  (unable to update local ref)
    error: cannot lock ref 'refs/remotes/origin/jetty-9.4.x-2711-tls_13_compliance': is at eadb7469ea009042a4bc23f1c16173c06c9d68a7 but expected f51c205c6fcdfee412f13a428a81dc2fd148e2ae
     ! f51c205c6f..eadb7469ea  jetty-9.4.x-2711-tls_13_compliance -> origin/jetty-9.4.x-2711-tls_13_compliance  (unable to update local ref)
    

    github desktop 1.3.4
    $ git --version
    git version 2.18.0
    macOS 10.13.6

    i'm going to remove the repo and start a new clone to see if what happens in a frew days.

  5. natros commented on Aug 27, 2018

    @natros
    Author

    and btw, this is what i have in my config

    $ cat jetty/.git/config
    [core]
    	repositoryformatversion = 0
    	filemode = true
    	bare = false
    	logallrefupdates = true
    	ignorecase = true
    	precomposeunicode = true
    [remote "origin"]
    	url = [email protected]:eclipse/jetty.project.git
    	fetch = +refs/heads/*:refs/remotes/origin/*
    [branch "master"]
    	remote = origin
    	merge = refs/heads/master
    [branch "jetty-9.4.x"]
    	remote = origin
    	merge = refs/heads/jetty-9.4.x
    [branch "jetty-10.0.x"]
    	remote = origin
    	merge = refs/heads/jetty-10.0.x
    
  6. zhzoo commented on Aug 28, 2018

    @zhzoo

    Least for me, the latest update fixed the issue.
    But previously, I had tried restarting my computer, killing all relevant processes, etc...

  7. natros commented on Aug 28, 2018

    @natros
    Author

    and it's happening again but this time i'm posting the log from developer tools:

    launching: 1.3.4 (Mac OS 10.13.6)
    install.ts:31 execPath: '/Applications/GitHub Desktop.app/Contents/Frameworks/GitHub Desktop Helper.app/Contents/MacOS/GitHub Desktop Helper'
    3install.ts:31 [AppStore.withAuthenticatingUser] account found for repository: jetty.project - natros (has token)
    install.ts:31 Executing fetch: git -c credential.helper= fetch --progress --prune origin (took 1.691s)
    install.ts:23 `git -c credential.helper= fetch --progress --prune origin` exited with an unexpected code: 1.
    From https://github.com/eclipse/jetty.project
     - [deleted]               (none)     -> origin/jetty-9.4.x-2711-tls_13_compliance
     - [deleted]               (none)     -> origin/jetty-9.4.x-2844-clean-up-DefaultServlet-doc-and-webdefault
    remote: Counting objects: 221, done.        
    remote: Compressing objects:   1% (1/56)           
    remote: Compressing objects:   3% (2/56)           
    remote: Compressing objects:   5% (3/56)           
    remote: Compressing objects:   7% (4/56)           
    remote: Compressing objects:   8% (5/56)           
    remote: Compressing objects:  10% (6/56)           
    remote: Compressing objects:  12% (7/56)           
    remote: Compressing objects:  14% (8/56)           
    remote: Compressing objects:  16% (9/56)           
    remote: Compressing objects:  17% (10/56)           
    remote: Compressing objects:  19% (11/56)           
    remote: Compressing objects:  21% (12/56)           
    remote: Compressing objects:  23% (13/56)           
    remote: Compressing objects:  25% (14/56)           
    remote: Compressing objects:  26% (15/56)           
    remote: Compressing objects:  28% (16/56)           
    remote: Compressing objects:  30% (17/56)           
    remote: Compressing objects:  32% (18/56)           
    remote: Compressing objects:  33% (19/56)           
    remote: Compressing objects:  35% (20/56)           
    remote: Compressing objects:  37% (21/56)           
    remote: Compressing objects:  39% (22/56)           
    remote: Compressing objects:  41% (23/56)           
    remote: Compressing objects:  42% (24/56)           
    remote: Compressing objects:  44% (25/56)           
    remote: Compressing objects:  46% (26/56)           
    remote: Compressing objects:  48% (27/56)           
    remote: Compressing objects:  50% (28/56)           
    remote: Compressing objects:  51% (29/56)           
    remote: Compressing objects:  53% (30/56)           
    remote: Compressing objects:  55% (31/56)           
    remote: Compressing objects:  57% (32/56)           
    remote: Compressing objects:  58% (33/56)           
    remote: Compressing objects:  60% (34/56)           
    remote: Compressing objects:  62% (35/56)           
    remote: Compressing objects:  64% (36/56)           
    remote: Compressing objects:  66% (37/56)           
    remote: Compressing objects:  67% (38/56)           
    remote: Compressing objects:  69% (39/56)           
    remote: Compressing objects:  71% (40/56)           
    remote: Compressing objects:  73% (41/56)           
    remote: Compressing objects:  75% (42/56)           
    remote: Compressing objects:  76% (43/56)           
    remote: Compressing objects:  78% (44/56)           
    remote: Compressing objects:  80% (45/56)           
    remote: Compressing objects:  82% (46/56)           
    remote: Compressing objects:  83% (47/56)           
    remote: Compressing objects:  85% (48/56)           
    remote: Compressing objects:  87% (49/56)           
    remote: Compressing objects:  89% (50/56)           
    remote: Compressing objects:  91% (51/56)           
    remote: Compressing objects:  92% (52/56)           
    remote: Compressing objects:  94% (53/56)           
    remote: Compressing objects:  96% (54/56)           
    remote: Compressing objects:  98% (55/56)           
    remote: Compressing objects: 100% (56/56)           
    remote: Compressing objects: 100% (56/56), done.        
    remote: Total 221 (delta 64), reused 144 (delta 63), pack-reused 60        
    Receiving objects:   0% (1/221)   
    Receiving objects:   1% (3/221)   
    Receiving objects:   2% (5/221)   
    Receiving objects:   3% (7/221)   
    Receiving objects:   4% (9/221)   
    Receiving objects:   5% (12/221)   
    Receiving objects:   6% (14/221)   
    Receiving objects:   7% (16/221)   
    Receiving objects:   8% (18/221)   
    Receiving objects:   9% (20/221)   
    Receiving objects:  10% (23/221)   
    Receiving objects:  11% (25/221)   
    Receiving objects:  12% (27/221)   
    Receiving objects:  13% (29/221)   
    Receiving objects:  14% (31/221)   
    Receiving objects:  15% (34/221)   
    Receiving objects:  16% (36/221)   
    Receiving objects:  17% (38/221)   
    Receiving objects:  18% (40/221)   
    Receiving objects:  19% (42/221)   
    Receiving objects:  20% (45/221)   
    Receiving objects:  21% (47/221)   
    Receiving objects:  22% (49/221)   
    Receiving objects:  23% (51/221)   
    Receiving objects:  24% (54/221)   
    Receiving objects:  25% (56/221)   
    Receiving objects:  26% (58/221)   
    Receiving objects:  27% (60/221)   
    Receiving objects:  28% (62/221)   
    Receiving objects:  29% (65/221)   
    Receiving objects:  30% (67/221)   
    Receiving objects:  31% (69/221)   
    Receiving objects:  32% (71/221)   
    Receiving objects:  33% (73/221)   
    Receiving objects:  34% (76/221)   
    Receiving objects:  35% (78/221)   
    Receiving objects:  36% (80/221)   
    Receiving objects:  37% (82/221)   
    Receiving objects:  38% (84/221)   
    Receiving objects:  39% (87/221)   
    Receiving objects:  40% (89/221)   
    Receiving objects:  41% (91/221)   
    Receiving objects:  42% (93/221)   
    Receiving objects:  43% (96/221)   
    Receiving objects:  44% (98/221)   
    Receiving objects:  45% (100/221)   
    Receiving objects:  46% (102/221)   
    Receiving objects:  47% (104/221)   
    Receiving objects:  48% (107/221)   
    Receiving objects:  49% (109/221)   
    Receiving objects:  50% (111/221)   
    Receiving objects:  51% (113/221)   
    Receiving objects:  52% (115/221)   
    Receiving objects:  53% (118/221)   
    Receiving objects:  54% (120/221)   
    Receiving objects:  55% (122/221)   
    Receiving objects:  56% (124/221)   
    Receiving objects:  57% (126/221)   
    Receiving objects:  58% (129/221)   
    Receiving objects:  59% (131/221)   
    Receiving objects:  60% (133/221)   
    Receiving objects:  61% (135/221)   
    Receiving objects:  62% (138/221)   
    Receiving objects:  63% (140/221)   
    Receiving objects:  64% (142/221)   
    Receiving objects:  65% (144/221)   
    Receiving objects:  66% (146/221)   
    Receiving objects:  67% (149/221)   
    Receiving objects:  68% (151/221)   
    Receiving objects:  69% (153/221)   
    Receiving objects:  70% (155/221)   
    Receiving objects:  71% (157/221)   
    Receiving objects:  72% (160/221)   
    Receiving objects:  73% (162/221)   
    Receiving objects:  74% (164/221)   
    Receiving objects:  75% (166/221)   
    Receiving objects:  76% (168/221)   
    Receiving objects:  77% (171/221)   
    Receiving objects:  78% (173/221)   
    Receiving objects:  79% (175/221)   
    Receiving objects:  80% (177/221)   
    Receiving objects:  81% (180/221)   
    Receiving objects:  82% (182/221)   
    Receiving objects:  83% (184/221)   
    Receiving objects:  84% (186/221)   
    Receiving objects:  85% (188/221)   
    Receiving objects:  86% (191/221)   
    Receiving objects:  87% (193/221)   
    Receiving objects:  88% (195/221)   
    Receiving objects:  89% (197/221)   
    Receiving objects:  90% (199/221)   
    Receiving objects:  91% (202/221)   
    Receiving objects:  92% (204/221)   
    Receiving objects:  93% (206/221)   
    Receiving objects:  94% (208/221)   
    Receiving objects:  95% (210/221)   
    Receiving objects:  96% (213/221)   
    Receiving objects:  97% (215/221)   
    Receiving objects:  98% (217/221)   
    Receiving objects:  99% (219/221)   
    Receiving objects: 100% (221/221)   
    Receiving objects: 100% (221/221), 44.07 KiB | 8.81 MiB/s, done.
    Resolving deltas:   0% (0/64)   
    Resolving deltas:   4% (3/64)   
    Resolving deltas:   6% (4/64)   
    Resolving deltas:   7% (5/64)   
    Resolving deltas:   9% (6/64)   
    Resolving deltas:  10% (7/64)   
    Resolving deltas:  14% (9/64)   
    Resolving deltas:  15% (10/64)   
    Resolving deltas:  18% (12/64)   
    Resolving deltas:  21% (14/64)   
    Resolving deltas:  25% (16/64)   
    Resolving deltas:  26% (17/64)   
    Resolving deltas:  28% (18/64)   
    Resolving deltas:  29% (19/64)   
    Resolving deltas:  31% (20/64)   
    Resolving deltas:  32% (21/64)   
    Resolving deltas:  34% (22/64)   
    Resolving deltas:  35% (23/64)   
    Resolving deltas:  37% (24/64)   
    Resolving deltas:  39% (25/64)   
    Resolving deltas:  40% (26/64)   
    Resolving deltas:  43% (28/64)   
    Resolving deltas:  45% (29/64)   
    Resolving deltas:  46% (30/64)   
    Resolving deltas:  48% (31/64)   
    Resolving deltas:  50% (32/64)   
    Resolving deltas:  53% (34/64)   
    Resolving deltas:  54% (35/64)   
    Resolving deltas:  56% (36/64)   
    Resolving deltas:  57% (37/64)   
    Resolving deltas:  59% (38/64)   
    Resolving deltas:  60% (39/64)   
    Resolving deltas:  62% (40/64)   
    Resolving deltas:  64% (41/64)   
    Resolving deltas:  65% (42/64)   
    Resolving deltas:  67% (43/64)   
    Resolving deltas:  68% (44/64)   
    Resolving deltas:  70% (45/64)   
    Resolving deltas:  71% (46/64)   
    Resolving deltas:  73% (47/64)   
    Resolving deltas:  75% (48/64)   
    Resolving deltas:  76% (49/64)   
    Resolving deltas:  78% (50/64)   
    Resolving deltas:  79% (51/64)   
    Resolving deltas:  81% (52/64)   
    Resolving deltas:  82% (53/64)   
    Resolving deltas:  84% (54/64)   
    Resolving deltas:  85% (55/64)   
    Resolving deltas:  87% (56/64)   
    Resolving deltas:  89% (57/64)   
    Resolving deltas:  90% (58/64)   
    Resolving deltas:  92% (59/64)   
    Resolving deltas:  93% (60/64)   
    Resolving deltas:  95% (61/64)   
    Resolving deltas:  96% (62/64)   
    Resolving deltas:  98% (63/64)   
    Resolving deltas: 100% (64/64)   
    Resolving deltas: 100% (64/64), completed with 55 local objects.
    error: cannot lock ref 'refs/remotes/origin/jetty-9.4.x': is at 7cf027b98f27dd459dd9c1c1f30ffe8dc18745d2 but expected 5b5f2fcf5f8241dd9edb998b97ad5e6cd45130a8
     ! 5b5f2fcf5f..7cf027b98f  jetty-9.4.x           -> origin/jetty-9.4.x  (unable to update local ref)
     * [new branch]            feature/ldap_unit_test_2846 -> origin/feature/ldap_unit_test_2846
    error: cannot lock ref 'refs/remotes/origin/jetty-10.0.x': is at 90f15f278b2138834d37ddb963b18b5c43924550 but expected 5afe2e215f93f366d3d7e9c9f4378fb90509a9e5
     ! 5afe2e215f..90f15f278b  jetty-10.0.x          -> origin/jetty-10.0.x  (unable to update local ref)
     * [new branch]            jetty-9.4.x-2191-jpms -> origin/jetty-9.4.x-2191-jpms
    error: cannot lock ref 'refs/remotes/origin/jetty-9.4/troubleshooting-guide': is at 29934debd9a90c1f7b4c84b1d3877ccfbca7c9a2 but expected 1be776cb75d174bc83a3fdab3c7e054838446da7
     ! 1be776cb75..29934debd9  jetty-9.4/troubleshooting-guide -> origin/jetty-9.4/troubleshooting-guide  (unable to update local ref)
    
    error @ install.ts:23
    install.ts:31 Executing fetch: git -c credential.helper= fetch --progress --prune origin (took 1.683s)
    install.ts:31 Executing fetch: git -c credential.helper= fetch --progress --prune origin (took 1.026s)
    install.ts:23 `git -c credential.helper= fetch --progress --prune origin` exited with an unexpected code: 1.
    error: cannot lock ref 'refs/remotes/origin/jetty-9.4.x': is at 7cf027b98f27dd459dd9c1c1f30ffe8dc18745d2 but expected 5b5f2fcf5f8241dd9edb998b97ad5e6cd45130a8
    From https://github.com/eclipse/jetty.project
     ! 5b5f2fcf5f..7cf027b98f  jetty-9.4.x           -> origin/jetty-9.4.x  (unable to update local ref)
     * [new branch]            feature/ldap_unit_test_2846 -> origin/feature/ldap_unit_test_2846
    error: cannot lock ref 'refs/remotes/origin/jetty-10.0.x': is at 90f15f278b2138834d37ddb963b18b5c43924550 but expected 5afe2e215f93f366d3d7e9c9f4378fb90509a9e5
     ! 5afe2e215f..90f15f278b  jetty-10.0.x          -> origin/jetty-10.0.x  (unable to update local ref)
     * [new branch]            jetty-9.4.x-2191-jpms -> origin/jetty-9.4.x-2191-jpms
    error: cannot lock ref 'refs/remotes/origin/jetty-9.4/troubleshooting-guide': is at 29934debd9a90c1f7b4c84b1d3877ccfbca7c9a2 but expected 1be776cb75d174bc83a3fdab3c7e054838446da7
     ! 1be776cb75..29934debd9  jetty-9.4/troubleshooting-guide -> origin/jetty-9.4/troubleshooting-guide  (unable to update local ref)
    
    error @ install.ts:23
    install.ts:31 [AppStore.withAuthenticatingUser] account found for repository: Resteasy - natros (has token)
    install.ts:31 Executing fetch: git -c credential.helper= fetch --progress --prune origin (took 3.145s)
    install.ts:31 [AppStore.withAuthenticatingUser] account found for repository: maven - natros (has token)
    install.ts:31 Executing fetch: git -c credential.helper= fetch --progress --prune origin (took 1.535s)
    install.ts:31 Background fetch for 27 repositories took 9.797sec
    
    
  8. iAmWillShepherd commented on Aug 29, 2018

    @iAmWillShepherd
    Contributor

    I suspect this issue is caused by how we get the status of a repo. #5376 should fix this if your issue is indeed caused by us writing status to disk.

  9. added
    bug
    and removed
    more-info-needed
    on Aug 29, 2018
  10. cacho commented on Aug 30, 2018

    @cacho

    Happen from time to time to me too.
    I'm using VSCode an iTerm2 with agnoster theme to see the branch currently active.

    screen shot 2018-08-30 at 12 50 01 pm
    screen shot 2018-08-30 at 12 50 45 pm

  11. marek-benes commented on Sep 17, 2018

    @marek-benes

    I have the same problem on the latest version of MacOS.

  12. jsimmonds2 commented on Sep 25, 2018

    @jsimmonds2

    GitHub Desktop Version 1.4.0 on Windows 10 maybe similar bug right after clicking 'Pull origin'.
    I have no other tools/processes contacting my GitHub repo.

    ghdesktop-1 4 0

  13. Comply-it commented on Sep 26, 2018

    @Comply-it

    I'm experiencing this issue also. Github Desktop 1.40

  14. FernandoHurtado commented on Oct 10, 2018

    @FernandoHurtado

    Same issue on Arch linux

  15. 42 remaining items

  16. bawantha commented on Sep 12, 2023

    @bawantha

    Nothing worked for me

  17. abhijeet1033 commented on Oct 12, 2023

    @abhijeet1033

    image

    not able to fetch master changes.

  18. trickyearlobe commented on Oct 26, 2023

    @trickyearlobe

    This happens for me occasionally with the git commandline too, but it's only transient. A retry is usually successful.

    I believe (as @iAmWillShepherd suggested earlier) that one thing that can cause this is some kind of locking issue. My VSCode has a git plugin which periodically checks remote branch status to tell me how far behind my local branch is. If I remove said plugin I no longer get the issue.

  19. h-elbeheiry commented on Oct 27, 2023

    @h-elbeheiry

    never had this issue except 4 days ago, started happening with every commit/pull I have to do, Xcode 15.0, MacOS 14.0, GitHub Desktop Version 3.3.4 (arm64)

  20. fernandowolff commented on Dec 13, 2023

    @fernandowolff

    For me, on Windows at least, the only fix was to update the commit code of the branch it complains about directly on the .git/packed-refs file. This file contains all remote branches alongside their head commit codes. In this scenario, the code on this file for this branch was out-dated for some reason. So if you take the correct/latest commit code this branch should have and replace the code on that file with this new one, save it, it should work.

  21. ShaliniSekar22 commented on Feb 15, 2024

    @ShaliniSekar22

    remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 error: cannot lock ref 'refs/remotes/origin/sha/task': 'refs/remotes/origin/sha' exists; cannot create 'refs/remotes/origin/sha/task'
    From https://github.com/Rubix-StyleSpot-NopCommerce/Uzhavar-Nanban ! [new branch] sha/task -> origin/sha/task (unable to update local ref)
    c487e0f..9e99de8 uzhavar-dev-deploy -> origin/uzhavar-dev-deploy
    error: some local refs could not be updated; try running
    'git remote prune https://github.com/Rubix-StyleSpot-NopCommerce/Uzhavar-Nanban.git' to remove any old, conflicting branches

    I have this error How can I resolved it.

  22. moro256 commented on May 19, 2024

    @moro256

    if anyone still getting this you can try:
    git config remote.origin.prune true

  23. na-zi-ya commented on Jan 2, 2025

    @na-zi-ya

    Nothing worked for me

    same here..

  24. na-zi-ya commented on Jan 2, 2025

    @na-zi-ya

    git config remote.origin.prune true

    No solution has worked for me.... Can anyone help resolve this issue...?

  25. JohnScalesTR commented on Jan 14, 2025

    @JohnScalesTR

    7... years... later... still seeing the issue. Tried deleting the origin folder and pruning but nothing works.

  26. frankspies commented on Jan 16, 2025

    @frankspies

    i just had the same error message and in my case it was because i had created the local branch as:
    git checkout -b origin/dev__xyz
    instead of
    git checkout -b dev__xyz
    maybe this is your case too ?

  27. cryo commented on Feb 14, 2025

    @cryo

    If you are using a Mac, the filesystem that you are using is CASE-INSENSITIVE, which means branches named ROY and roy will collide.

    error: cannot lock ref 'refs/remotes/origin/roy': is at e384be3f30cac223ac5701ee8409abfdc2ebc371 but expected 229e8bd36b91ce41904348c5f9a2a72d6c8cba1e
    From https://github.com/NetBSD/src
     ! 229e8bd36b91..f1b9b4a621fa  roy        -> origin/roy  (unable to update local ref)
    

    This will probably break your brain:

    1830][cryo@morbo:~/Desktop/Github/src]$ ls -l .git/refs/remotes/origin/roy
    -rw-r--r--  1 cryo  staff  41 Feb 13 18:25 .git/refs/remotes/origin/roy
    [1831][cryo@morbo:~/Desktop/Github/src]$ ls -l .git/refs/remotes/origin/ROY
    -rw-r--r--  1 cryo  staff  41 Feb 13 18:25 .git/refs/remotes/origin/ROY
    [1831][cryo@morbo:~/Desktop/Github/src]$ ls -l .git/refs/remotes/origin/RoY
    -rw-r--r--  1 cryo  staff  41 Feb 13 18:25 .git/refs/remotes/origin/RoY
    

    So my theory is that the hash changes based on what the committed put into the tree ... there may be two branches, called ROY and roy, but the filesystem will see them as the same and git will burp.

  28. iainheng commented on Apr 11, 2025

    @iainheng

    I am experiencing this issue only when my Cursor IDE is opened. Close the Cursor IDE and it works again.

  29. gabri-melis commented on Jun 10, 2025

    @gabri-melis

    None of the solutions proposed has worked for me. I had to delete the local copy of the repo and clone it again. Working on a pretty powerful but old Windows laptop.

  30. agrawalmanu16 commented on Oct 6, 2025

    @agrawalmanu16

    Below command works best in resolving the issues.
    git update-ref -d refs/remotes/origin/BRANCH NAME WITH REF ISSUE

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority-2

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions