Re: set-upstream for existing branch...?
- From
knittl <knittl89@googlemail.com>
- Date
- Feb 17, 2011, 09:25 UTC
- Message-ID
- <AANLkTimPYkEczv=suCr02rVb3OSg_h9o88_5CEmonPTR@mail.gmail.com>
- In-Reply-To
- <4D5CDB01.9070502@drmicha.warpmail.net>
On Thu, Feb 17, 2011 at 9:23 AM, Michael J Gruber <git@drmicha.warpmail.net> wrote:
Show 15 quoted lines
> Miles Bader venit, vidit, dixit 17.02.2011 08:24:
>> Hmm, on a related note, is there an obvious way to _show_ the current
>> branch's upstream...?
>>
>> [I mean, which just prints out "origin/master" or whatever...]
>>
>> Thanks,
>>
>> -miles
>>
>
> git for-each-ref --format="%(upstream)" $(git symbolic-ref HEAD)
>
> I can't come up with a better way of expanding @{u} without resolving
> the resulting refname to a SHA1. You could dowhat about
git branch -vv
it will show all local branches with their upstream plus behind/ahead numbers
cheers, daniel
-- typed with http://neo-layout.org myFtPhp -- visit http://myftphp.sf.net -- v. 0.4.7 released!