如何使git-status检查两个不同的遥控器? [英] How can I make git-status check two different remotes?

查看:143
本文介绍了如何使git-status检查两个不同的遥控器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每个git用户都习惯于此:

Every git user is accustomed to this:

> git status
On branch master
Your branch is up-to-date with 'origin/master'.

nothing to commit, working directory clean

但是,最近我开始使用两个遥控器而不是一个(heroku和github,我认为这是非常标准的情况),这开始让我很烦,只在git status输出中看到1个起源.

However, recently I've started working with two remotes instead of one (heroku and github, pretty standard situation, I think), and it started to annoy me to only see 1 origin in git status output.

如何添加其他遥控器,这样我会看到类似的东西?

How can I add other remote so I would see something like this?

> git status
On branch master
Your branch is up-to-date with 'origin/master'.
Your branch is up-to-date with 'heroku/master'.

nothing to commit, working directory clean

(此问题与heroku或github无关,这只是一个方便的示例.)

推荐答案

git status是工作树的状态,一次一次分支.

git status is the status of your worktree, one-branch-at-a-time status.

如果要查看所有分支的状态,请执行

if you want to see all-branch status, do

git branch -avvv

这篇关于如何使git-status检查两个不同的遥控器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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