Re: How to specify remote branch correctly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 17 Dec 2012 07:02:46 +0000, Woody Wu <narkewoody@xxxxxxxxx> wrote:
> On 2012-12-17, Tomas Carnecky <tomas.carnecky@xxxxxxxxx> wrote:
> > 'git checkout foo' has special meaning if a local branch with that
> > name doesn't exist but there is a remote branch with that name. In
> > that case it's equivalent to: git checkout -t -b foo origin/foo.
> > Because that's what people usually want.
> 
> I think this is what exactly happened to me in the first time I got the
> 'foo'.  One new thing to me is the '-t'.  I am not sure wether the '-t'
> was used or not in the background.  How do I check the 'upstream'
> relationships?  Is there any file under .git recoreded that kind of
> information?

Yes, that information is recorded in a file somewhere in .git. However, for
most users it's irrelevant which file it is. Git has commands to access this
information. Try one of these:

  git branch -vv
  git remote show origin
  git rev-parse --abbrev-ref --symbolic-full-name @{u}
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]