问题描述
我不明白第二行输出到 git branch -l -a
: remotes / origin / HEAD - >原产地/主人
。
git branch -l -a
* master
remotes / origin / HEAD - >原产地/主人
遥控器/原产地/主人
这是来自其他操作的剩余物吗?我应该清理它吗?我该怎么做?
通常我会在cli上使用git,但是在本地存储库上我尝试过使用 TortoiseGit $ c
不,不需要清理:它是符号化的分支引用你的远程仓库。
当你克隆你的仓库时,你将默认在由 remotes / origin / HEAD
引用的分支上。
另请参阅:
I don't understand the second line in the output to git branch -l -a
: remotes/origin/HEAD -> origin/master
.
git branch -l -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/master
Is that a leftover from another operation? Should I clean it up? And how would I do that?
Usually I work with git on the cli, but on this local repository I experimented with TortoiseGit
to find an easy git workflow for a friend.
No, no need to clean up: it is the symbolic branch referenced by your remote repo.
When you clone your repo, you will be by default on the branch referenced by remotes/origin/HEAD
.
See also:
- "Git: Correct way to change Active Branch in a bare repository?"
- "How do I change a Git remote HEAD to point to something besides "master""
- "How does
origin/HEAD
get set?"
这篇关于为什么会有`遥控器/原点/头部 - >我的`git branch -l -a`输出中的origin / master`项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!