git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Woody Wu <narkewoody@gmail.com>
To: git@vger.kernel.org
Subject: Re: How to specify remote branch correctly
Date: Mon, 17 Dec 2012 07:41:33 +0000 (UTC)	[thread overview]
Message-ID: <slrnkctj37.mmj.narkewoody@zuhnb712.local.com> (raw)
In-Reply-To: 1355728904-ner-4851@calvin

On 2012-12-17, Tomas Carnecky <tomas.carnecky@gmail.com> wrote:
> On Mon, 17 Dec 2012 07:02:46 +0000, Woody Wu <narkewoody@gmail.com> wrote:
>> On 2012-12-17, Tomas Carnecky <tomas.carnecky@gmail.com> 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

Run this on my local linux tree, I got:
  lgf2410-2.6.16.4         7af1fda - added a ignore rule in .gitignore
  (*~)
  * lgf2410-2.6.34.13        50d3f9d ax88796b verbose debug output
    lgf2410-2.6.34.13-16C554 3ec82e0 more debug on 16C554
      master                   9489e9d [origin/master] Linux 3.7-rc7

Does this mean, I only have local branch master tracked to remote?


>   git remote show origin
Running this I got,

    ...
    linux-3.1.y    tracked
    linux-3.2.y    tracked
    linux-3.3.y    tracked
    linux-3.4.y    tracked
    linux-3.5.y    tracked
    linux-3.6.y    tracked
    linux-3.7.y    new (next fetch will store in remotes/origin)
    master         tracked
  Local branch configured for 'git pull':
    master rebases onto remote master
  Local ref configured for 'git push':
    master pushes to master (local out of date)

I am curious to know how the last 4 lines were printed by git.

  -----
  Local branch configured for 'git pull':
    master rebases onto remote master
  -----

If I have addtional branch other than master that also track to some
remote branch, will it also be listed under this 'git pull' line?

  ----
  Local ref configured for 'git push':
    master pushes to master (local out of date)
  ---

This I totally don't understand, what it mean? I think I did not do a
modification on the local 'master'.

Thanks!

-- 
woody
I can't go back to yesterday - because I was a different person then.

  reply	other threads:[~2012-12-17  7:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-17  2:30 How to specify remote branch correctly Woody Wu
2012-12-17  4:27 ` Andrew Ardill
2012-12-17  5:06   ` Woody Wu
2012-12-17  5:13     ` Andrew Ardill
2012-12-17  5:30       ` Tomas Carnecky
2012-12-17  5:52         ` Andrew Ardill
2012-12-17  6:44           ` Chris Rorvick
2012-12-17  7:02         ` Woody Wu
2012-12-17  7:21           ` Tomas Carnecky
2012-12-17  7:41             ` Woody Wu [this message]
2012-12-17  6:48       ` Woody Wu

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=slrnkctj37.mmj.narkewoody@zuhnb712.local.com \
    --to=narkewoody@gmail.com \
    --cc=git@vger.kernel.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).