Why is “origin/HEAD” shown when running “git branch -r”?

后端 未结 7 1332
故里飘歌
故里飘歌 2020-11-28 01:16

When you run git branch -r why the blazes does it list origin/HEAD? For example, there\'s a remote repo on GitHub, say, with two branches: master a

7条回答
  •  孤城傲影
    2020-11-28 01:51

    There's always a HEAD that points to the currently checked out branch on the remote repo (which may or may not be master). Even remote repositories have current branches. Usually it is master, and off the top of my head I can't think of any reason why one would want to change it, but it can be changed.

提交回复
热议问题