threads / discuss / 22323

How do I get a list of tracking branches

Subject: How do I get a list of tracking branches

## tl;dr

3 messages between Jan 21, 2010 and Jan 21, 2010.

replies: 2people: 2as markdown or json

Howard Miller· Jan 21, 2010, 09:25 UTC · lore
Hi,

I know I can go and look at the config file and get this info but is there a simple command that shows which local branches are tracking remote branches? It seems like a very obvious thing to want to know but I can't find it. 'branch -av' even shows 'n behind' and/or 'n ahead' but not *what* it is behind or ahead.

Thanks!
Michael J Gruber· Jan 21, 2010, 09:52 UTC · re: Howard Miller · lore

Re: How do I get a list of tracking branches

Howard Miller venit, vidit, dixit 21.01.2010 10:25:
Show 7 quoted lines
> Hi,
> 
> I know I can go and look at the config file and get this info but is
> there a simple command that shows which local branches are tracking
> remote branches? It seems like a very obvious thing to want to know
> but I can't find it. 'branch -av' even shows 'n behind' and/or 'n
> ahead' but not *what* it is behind or ahead.
The latter info you get with git branch -vv.

But you said you wanted to know which local branches have upstreams. Or do you want to know which local branches have a specific remote as upstream?

Michael
Howard Miller· Jan 21, 2010, 10:03 UTC · re: Michael J Gruber · lore

Re: How do I get a list of tracking branches

Show 12 quoted lines
>> I know I can go and look at the config file and get this info but is
>> there a simple command that shows which local branches are tracking
>> remote branches? It seems like a very obvious thing to want to know
>> but I can't find it. 'branch -av' even shows 'n behind' and/or 'n
>> ahead' but not *what* it is behind or ahead.
>
> The latter info you get with git branch -vv.
>
> But you said you wanted to know which local branches have upstreams. Or
> do you want to know which local branches have a specific remote as upstream?
>
> Michael
Hi Michael,

Thanks. That's *exactly* what I needed. It's just an extension of my general rant that while git makes it very easy to create branches it also makes it very easy to forget why you created them. Or it's easy for me to forget anyway :-)

Howard

← back to recent threads