Git上的那些红色远程分支是什么? [英] What are those red remote branches on Git?

查看:1476
本文介绍了Git上的那些红色远程分支是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是git的新手,正在尝试建立一个存储库.

I'm new to git and trying to set up a repository.

我有两个分支(masterxyz).

I got two branches (master and xyz).

到目前为止我的工作流程:

My workflow so far:

  1. 更改为特定分支,例如git checkout xyz
  2. 进行更改
  3. git add .
  4. git commit -am 'whatevermessage'
  5. git push origin xyz
  1. change to specific branch, e.g. git checkout xyz
  2. make changes
  3. git add .
  4. git commit -am 'whatevermessage'
  5. 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/masterremotes/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屋!

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