home | list info | list archive | date index | thread index

[OCLUG-Tech] how can i display what remote a git branch name maps to without tracking it?

  • Subject: [OCLUG-Tech] how can i display what remote a git branch name maps to without tracking it?
  • From: "Robert P. J. Day" <rpjday [ at ] crashcourse [ dot ] ca>
  • Date: Tue, 11 Oct 2016 08:13:57 -0400 (EDT)
  i'm sure i'm missing a trivial way to do this -- how can i display
the corresponding remote for a branch name before i begin tracking it?

  eg:  i clone openembedded-core, wherein:

$ git branch
* master
$ git branch -a
* master
  remotes/origin/2011-1
  remotes/origin/HEAD -> origin/master
  remotes/origin/daisy
  remotes/origin/danny
  remotes/origin/denzil
  remotes/origin/dizzy
  remotes/origin/dora
  remotes/origin/dylan
  remotes/origin/fido
  remotes/origin/jethro
  remotes/origin/krogoth
  remotes/origin/master
  remotes/origin/master-next
  remotes/origin/master-next-1.9
  remotes/origin/morty
$

  now i can see the remote tracking branch for "morty" down there, but
is there a simple command that would let me ask, "what remote tracking
branch corresponds to 'morty'?" (for now, i'm assuming there is only
one such answer, but that might not be true if i add several remotes.)

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================