为什么会有`遥控器/原点/头部 - >我的`git branch -l -a`输出中的origin / master`项? [英] Why is there a `remotes/origin/HEAD -> origin/master` entry in my `git branch -l -a` output?

查看:114
本文介绍了为什么会有`遥控器/原点/头部 - >我的`git branch -l -a`输出中的origin / master`项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不明白第二行输出到 git branch -l -a remotes / origin / HEAD - >原产地/主人

  git branch -l -a 
* master
remotes / origin / HEAD - >原产地/主人
遥控器/原产地/主人

这是来自其他操作的剩余物吗?我应该清理它吗?我该怎么做?



通常我会在cli上使用git,但是在本地存储库上我尝试过使用 TortoiseGit

解决方案

不,不需要清理:它是符号化的分支引用你的远程仓库。

当你克隆你的仓库时,你将默认在由 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 branch -l -a`输出中的origin / master`项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆