git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Josh Ralburton <josh.ralburton@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Question about "branch.<name>.merge"
Date: Fri, 18 Mar 2011 14:13:09 -0700	[thread overview]
Message-ID: <7vei64w2sa.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <AANLkTin-96TK_8MjAM7MB4CCyZ0ZSvD=ZanaYWLiXsvC@mail.gmail.com> (Josh Ralburton's message of "Fri, 18 Mar 2011 12:35:15 -0700")

Josh Ralburton <josh.ralburton@gmail.com> writes:

> This is a typical section from a .git config file:
>
> [remote "origin"]
>     fetch = +refs/heads/*:refs/remotes/origin/*
>     url = git://git.kernel.org/pub/scm/git/git.git
> [branch "master"]
>     remote = origin
>     merge = refs/heads/master
>
> I am curious why "branch.master.merge=refs/heads/master"  was
> implemented to refer to the remote branch (refs/heads/master) rather
> than the local branch (refs/remotes/origin/master).

Because conceptually you are merging with the refs/heads/master branch
that exists at the "origin" repository, not merging with a remote tracking
branch that the "origin" repository may have to track its upstream.

It is immaterial that you happen to have a copy of it at your own remote
tracking branch (i.e. refs/remotes/origin/master).  If you don't need
tracking branches, you can even do something like this:

	[remote "origin"]
                url = git://...there
        [branch "master"]
		remote = origin
                merge = refs/heads/master

Notice that you are telling git not to create any remote tracking branches
with this configuration.

      reply	other threads:[~2011-03-18 21:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-18 19:35 Question about "branch.<name>.merge" Josh Ralburton
2011-03-18 21:13 ` Junio C Hamano [this message]

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=7vei64w2sa.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=josh.ralburton@gmail.com \
    /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).