git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* get-upstream
@ 2010-09-23  3:46 Ramana Kumar
  2010-09-23  4:05 ` get-upstream Pat Notz
  0 siblings, 1 reply; 7+ messages in thread
From: Ramana Kumar @ 2010-09-23  3:46 UTC (permalink / raw)
  To: git

Is there an easy command to get a symbolic reference to the upstream
branch of a tracking branch?

For example, to get the current branch name I can do this:

$ git symbolic-ref HEAD
refs/heads/mybranchname

Now I can see the upstream name as follows

$ git branch -vv
branch1 ...
mybranchname sha [upstreamname: ahead n] ...
branch3 ...

My question is is there a way to get upstreamname directly to stdout,
similar to the symbolic-ref command?

(I don't want to have to type it manually; tab completion helps a
little, but looking for more. Plus this would be necessary to avoid
scraping in a script.)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-09-23 14:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-23  3:46 get-upstream Ramana Kumar
2010-09-23  4:05 ` get-upstream Pat Notz
2010-09-23  4:15   ` get-upstream Pat Notz
2010-09-23  4:16     ` get-upstream Ramana Kumar
2010-09-23  5:37       ` get-upstream Jeff King
2010-09-23 14:28         ` get-upstream Pat Notz
2010-09-23  5:36     ` get-upstream Jeff King

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).