问题描述
当我运行 git show-ref $ c $时, c>在我的本地克隆回购中我得到以下输出:
8d88cfa72092d62ccc197192b62d3befe1ecd9c8 refs / heads / HEAD
0048436ad5e3db15cb92070f03704a0637a60359 refs / heads / GH-页
8d88cfa72092d62ccc197192b62d3befe1ecd9c8裁判/头/主
8d88cfa72092d62ccc197192b62d3befe1ecd9c8参/遥控器/产地/ HEAD
0048436ad5e3db15cb92070f03704a0637a60359参/遥控器/产地/ GH-页
8d88cfa72092d62ccc197192b62d3befe1ecd9c8参/遥控器/产地/ master
-
refs / heads / HEAD
和
refs / heads / master
? github的web界面只显示master
。 -
refs / heads
和refs / remotes
。
它就像一个符号链接(symref),以便默认引用分支(你在克隆时看到的分支)
请参阅, gh-pages
通常是一个孤立分支(您永远不会将它合并到任何其他分支)。
I have a GitHub repository that I've cloned to my local.
When I run git show-ref
on my locally cloned repo I get following output:
8d88cfa72092d62ccc197192b62d3befe1ecd9c8 refs/heads/HEAD
0048436ad5e3db15cb92070f03704a0637a60359 refs/heads/gh-pages
8d88cfa72092d62ccc197192b62d3befe1ecd9c8 refs/heads/master
8d88cfa72092d62ccc197192b62d3befe1ecd9c8 refs/remotes/origin/HEAD
0048436ad5e3db15cb92070f03704a0637a60359 refs/remotes/origin/gh-pages
8d88cfa72092d62ccc197192b62d3befe1ecd9c8 refs/remotes/origin/master
- What is the difference between
refs/heads/HEAD
andrefs/heads/master
? The github web interface shows onlymaster
. - What is the difference between
refs/heads
andrefs/remotes
.
It is like a symbolic link (a symref) in order to reference the branch by default (the one you see when you clone)
See "Git References"
$ cat .git/HEAD
ref: refs/heads/master
Those are your local and remote references for each branch: you can have done new commits on local which are not yet present on the GitHub repo. (or vice-versa)
See "Git Branching - Remote Branches":
Note: In a GitHub project page, the gh-pages
is typically an orphan branch (you never merge it to any other branches).
这篇关于什么是github“项目页面”中的各个分支?克隆的存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!