Lost reference to origin/HEAD
.
When I execute command git branch -r
, I see just these branches.
git branch -r
origin/master
origin/some-other-branch
How can I get origin/HEAD
linked back to origin/master
origin/HEAD -> origin/master
origin/master
origin/some-other-branch
You can locally set it with:
git remote set-head origin master
git remote set-head origin -a
But it is supposed to be set on the upstream repo itself (and in your local repo when cloning the upstream repo).
See "How does origin/HEAD
get set?".
That means, it remains a local setting to your local repo, and has no influence on the actual HEAD of the upstream repo (hence the -a
option to get it from the upstream repo itself).
See more at "Change a Git remote HEAD to point to something besides master".
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments