git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: knittl <knittl89@googlemail.com>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: Miles Bader <miles@gnu.org>, Jay Soffian <jaysoffian@gmail.com>,
	git@vger.kernel.org
Subject: Re: set-upstream for existing branch...?
Date: Thu, 17 Feb 2011 10:25:32 +0100	[thread overview]
Message-ID: <AANLkTimPYkEczv=suCr02rVb3OSg_h9o88_5CEmonPTR@mail.gmail.com> (raw)
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:
> 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 do

what 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!

  reply	other threads:[~2011-02-17  9:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-17  5:19 set-upstream for existing branch...? Miles Bader
2011-02-17  7:08 ` Jay Soffian
2011-02-17  7:11   ` Miles Bader
2011-02-17  7:24     ` Miles Bader
2011-02-17  7:45       ` Jay Soffian
2011-02-17  8:23       ` Michael J Gruber
2011-02-17  9:25         ` knittl [this message]
2011-02-17  9:41           ` Michael J Gruber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTimPYkEczv=suCr02rVb3OSg_h9o88_5CEmonPTR@mail.gmail.com' \
    --to=knittl89@googlemail.com \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=jaysoffian@gmail.com \
    --cc=miles@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).