Link `origin/HEAD` back to `origin/master`

java_dude

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
VonC

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.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Creating a back link

From Dev

back link but not use history

From Dev

Creating a back link using Grails

From Dev

Bootstrap Affix "Back to Top" Link

From Dev

link back to form visited before

From Dev

Link back to App using FBDialogs

From Dev

Ionic link without back button

From Dev

Conditional Back OR Close link in PHP

From Dev

Pass link back to notice in Rails

From Dev

Flask-Admin link back to main site

From Dev

Grails link id not getting sent back to the server

From Dev

How to get back to root link in jsp

From Dev

Back to Top Link with a slow animation (CSS only)

From Dev

Back to top link inserts additional code to URL

From Dev

Back to top link on longer pages with dynamic content

From Dev

Back link in the view should change according to controllers

From Dev

Folder alias / Symbolic link to return to back folder

From Dev

Make a back to previous url link in error 404

From Dev

Go back to previous Div upon clicking link

From Dev

Back to top link inserts additional code to URL

From Dev

How to get back my Teams meeting link?

From Dev

pass a link back from angular controller

From Dev

Is there a purpose to a symbolic link that points back to the directory containing it?

From Dev

Link `origin/HEAD` back to `origin/master`

From Dev

Link back to a certain point of a Javascript controlled page

From Dev

yii2: how to creating a back link button

From Dev

How do I make the link in the back div clickable

From Dev

Clicking anchor link makes scrolling back to top impossible as top dissapears

From Dev

Entity Framework relationship 0..1 with 1..* back link