git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* how to make "pull" always pulling the matching branch?
@ 2009-05-12 19:21 Oliver Kullmann
  2009-05-13 13:12 ` Michael J Gruber
  0 siblings, 1 reply; 2+ messages in thread
From: Oliver Kullmann @ 2009-05-12 19:21 UTC (permalink / raw)
  To: git

Hello,

until some time ago,

git pull remote-repo

worked like that; alright, at some time
warning messages appeared, so I used

git pull remote-repo master

I attempted several times to understand the
strange message issued by pull:
--------------------
You asked me to pull without telling me which branch you
want to merge with, and 'branch.master.merge' in
your configuration file does not tell me either.        Please
specify which branch you want to merge on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details.

If you often merge with the same branch, you may want to
configure the following variables in your configuration
file:

    branch.master.remote = <nickname>
    branch.master.merge = <remote-ref>
    remote.<nickname>.url = <url>
    remote.<nickname>.fetch = <refspec>

See git-config(1) for details.
--------------------
but neither do I understand what could be meant here, nor
do I understand the details of git-pull or git-config w.r.t.
this issue (the above doesn't give a hint about the meaning
of the possible actions).

So well, now the same thing happened with "git push", but here
the message actually is better and tells the reader what to do
(nearly); so I specified "matching" for the config-variable 
push.default, and that's fine.

I was hoping that there would also be a pull.default, which I could
set to matching, but apparently there is nothing like that? How
do I achieve this?

It seems rather sensible to me to have this as the default: just
pull a matching branch, not more, not less --- what else could/should
it be if nothing else is specified?

Oliver

P.S. I'm using version 1.6.3.

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

* Re: how to make "pull" always pulling the matching branch?
  2009-05-12 19:21 how to make "pull" always pulling the matching branch? Oliver Kullmann
@ 2009-05-13 13:12 ` Michael J Gruber
  0 siblings, 0 replies; 2+ messages in thread
From: Michael J Gruber @ 2009-05-13 13:12 UTC (permalink / raw)
  To: Oliver Kullmann; +Cc: git

Oliver Kullmann venit, vidit, dixit 12.05.2009 21:21:
> Hello,
> 
> until some time ago,
> 
> git pull remote-repo
> 
> worked like that; alright, at some time
> warning messages appeared, so I used
> 
> git pull remote-repo master
> 
> I attempted several times to understand the
> strange message issued by pull:
> --------------------
> You asked me to pull without telling me which branch you
> want to merge with, and 'branch.master.merge' in
> your configuration file does not tell me either.        Please
> specify which branch you want to merge on the command line and
> try again (e.g. 'git pull <repository> <refspec>').
> See git-pull(1) for details.
> 
> If you often merge with the same branch, you may want to
> configure the following variables in your configuration
> file:
> 
>     branch.master.remote = <nickname>
>     branch.master.merge = <remote-ref>
>     remote.<nickname>.url = <url>
>     remote.<nickname>.fetch = <refspec>
> 
> See git-config(1) for details.
> --------------------
> but neither do I understand what could be meant here, nor
> do I understand the details of git-pull or git-config w.r.t.
> this issue (the above doesn't give a hint about the meaning
> of the possible actions).
> 
> So well, now the same thing happened with "git push", but here
> the message actually is better and tells the reader what to do
> (nearly); so I specified "matching" for the config-variable 
> push.default, and that's fine.
> 
> I was hoping that there would also be a pull.default, which I could
> set to matching, but apparently there is nothing like that? How
> do I achieve this?
> 
> It seems rather sensible to me to have this as the default: just
> pull a matching branch, not more, not less --- what else could/should
> it be if nothing else is specified?

Is "remote-repo" in your case a URL or a remote config? For the latter
you should have remote.foo.{url,fetch} config already.

The branch.foo.{remote,merge} is set up automatically in many cases. Do
you have any of these?

Michael

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

end of thread, other threads:[~2009-05-13 13:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-12 19:21 how to make "pull" always pulling the matching branch? Oliver Kullmann
2009-05-13 13:12 ` Michael J Gruber

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