github "project page" 克隆存储库中的各个分支是什么?
What are the various branches in a github "project page" cloned repository?
我有一个已克隆到本地的 GitHub 存储库。
当我在本地克隆的仓库中 运行 git show-ref
时,我得到以下输出:
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
refs/heads/HEAD
和refs/heads/HEAD
有什么区别
refs/heads/master
? github 网页界面只显示 master
.
refs/heads
和refs/remotes
有什么区别。
What is the difference between refs/heads/HEAD and refs/heads/master?
它就像一个符号 link(符号引用),以便默认引用分支(克隆时看到的分支)
参见“Git References”
The HEAD file is a symbolic reference to the branch you’re currently on.
By symbolic reference, we mean that unlike a normal reference, it doesn’t generally contain a SHA-1 value but rather a pointer to another reference.
If you look at the file, you’ll normally see something like this:
$ cat .git/HEAD
ref: refs/heads/master
What is the difference between refs/heads and refs/remotes
这些是您对每个分支的本地和远程引用:您可以在本地完成新的提交,但 GitHub 存储库中还没有。 (反之亦然)
参见“Git Branching - Remote Branches”:
注意:在 GitHub project page 中,gh-pages
通常是一个孤立分支(您永远不会将它合并到任何其他分支)。
我有一个已克隆到本地的 GitHub 存储库。
当我在本地克隆的仓库中 运行 git show-ref
时,我得到以下输出:
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
refs/heads/HEAD
和refs/heads/HEAD
有什么区别refs/heads/master
? github 网页界面只显示master
.refs/heads
和refs/remotes
有什么区别。
What is the difference between refs/heads/HEAD and refs/heads/master?
它就像一个符号 link(符号引用),以便默认引用分支(克隆时看到的分支)
参见“Git References”
The HEAD file is a symbolic reference to the branch you’re currently on.
By symbolic reference, we mean that unlike a normal reference, it doesn’t generally contain a SHA-1 value but rather a pointer to another reference.
If you look at the file, you’ll normally see something like this:
$ cat .git/HEAD
ref: refs/heads/master
What is the difference between refs/heads and refs/remotes
这些是您对每个分支的本地和远程引用:您可以在本地完成新的提交,但 GitHub 存储库中还没有。 (反之亦然)
参见“Git Branching - Remote Branches”:
注意:在 GitHub project page 中,gh-pages
通常是一个孤立分支(您永远不会将它合并到任何其他分支)。