Last active
October 23, 2024 17:09
-
-
Save libitte/cbde168d26bc5faf9bf9fef648091b42 to your computer and use it in GitHub Desktop.
FIX warning: ignoring broken ref refs/remotes/origin/HEAD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
warning: ignoring broken ref refs/remotes/origin/HEAD | |
``` | |
➜ mery_revision git:(spa_routing) ✗ g symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/develop | |
➜ mery_revision git:(spa_routing) ✗ g fetch --prune | |
From ssh://github.com/peroli-inc/mery_revision | |
x [deleted] (none) -> origin/spa_routing | |
remote: Counting objects: 1, done. | |
remote: Total 1 (delta 0), reused 0 (delta 0), pack-reused 0 | |
Unpacking objects: 100% (1/1), done. | |
78f85b0..fc4fa6b develop -> origin/develop | |
➜ mery_revision git:(spa_routing) ✗ g gc | |
Counting objects: 1334, done. | |
Delta compression using up to 8 threads. | |
Compressing objects: 100% (750/750), done. | |
Writing objects: 100% (1334/1334), done. | |
Total 1334 (delta 597), reused 1043 (delta 464) | |
``` | |
https://www.netroby.com/view/3864 | |
Thank you disso!
WOOT! Thanks dlsso!
Thank you!
Thank you very much, @disso!
Thanks @disso
I did not want "HEAD" at all. I removed it using this:
git remote set-head origin -d
worked for me, thanks.
thanks
in my case primary branch name was "production"
I ran git remote set-head origin production
to solve this issue.
Disso thanks for leaving the comment, it helped me fix my error. Cheers,
Thanks @dlsso
👍
Thanks @dlsso
yo that's good no cap
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is one of the first google results for this problem so I'd like to add a little info:
git branch -r
is useful here. In my case it showed remote branches but did NOT haveorigin/HEAD
.In that event you can simply do
git remote set-head origin main
where "main" is the name of your primary (head) branch.Running
git branch -r
again now showsorigin/HEAD -> origin/main
and the warning goes away.Some relevant discussion here. Posts by Jeff King are especially informative.