Git上的那些红色远程分支是什么? [英] What are those red remote branches on Git?
问题描述
我是git的新手,正在尝试建立一个存储库.
I'm new to git and trying to set up a repository.
我有两个分支(master
和xyz
).
I got two branches (master
and xyz
).
到目前为止我的工作流程:
My workflow so far:
- 更改为特定分支,例如
git checkout xyz
- 进行更改
-
git add .
-
git commit -am 'whatevermessage'
-
git push origin xyz
- change to specific branch, e.g.
git checkout xyz
- make changes
git add .
git commit -am 'whatevermessage'
git push origin xyz
到目前为止一切正常.但是,当我git branch -a
查看所有分支时,会得到以下输出:
Everything works so far. But when I git branch -a
to view all my branches, I get the following output:
master
* xyz
remotes/origin/master
remotes/origin/xyz
,而remotes/origin/master
和remotes/origin/xyz
用红色显示.我试图弄清楚红色的含义,但找不到任何东西.因此,假设红色等同于某种错误:红色是什么意思,我该如何解决?
while remotes/origin/master
and remotes/origin/xyz
are displayed in red color. I tried to figure out what the red color means but I couldn't find anything. So, assuming that red is equivalent to some kind of error: what does the red color mean and how can I fix it?
推荐答案
黄色是本地分支,红色是远程分支.
Yellow is local branch while red is a remote branch.
默认情况下:
[color "branch"]
local = yellow
remote = red
plain = normal
这篇关于Git上的那些红色远程分支是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!