From: "Björn Steinbrink" <B.Steinbrink@gmx.de>
To: Jan Nieuwenhuizen <janneke-list@xs4all.nl>
Cc: Tomas Carnecky <tom@dbservice.com>, git list <git@vger.kernel.org>
Subject: Re: Unhelpful "branch.master.remote = <nickname>" advice?
Date: Thu, 12 Nov 2009 15:56:35 +0100 [thread overview]
Message-ID: <20091112145635.GA6721@atjola.homenet> (raw)
In-Reply-To: <1258035449.26362.273.camel@heerbeest>
On 2009.11.12 15:17:29 +0100, Jan Nieuwenhuizen wrote:
> Op woensdag 11-11-2009 om 21:32 uur [tijdzone +0100], schreef Tomas
> Carnecky:
>
> Hi Tomas,
>
> > It didn't tell you to copy'n'paste the whole lines to a git-config(1)
> > commandline. But I do see that the output can be confusing for someone
> > not familiar with the git configuration files/git-config.
>
> Once I get this to work, I'll send a patch for it.
>
> > I don't know the relationship between you and eddy, but usually you
> > shouldn't rebase (=rewrite) eddies commits. That also means you'd have
> > to live with the merge commits.
>
> Hmm, okay.
>
> > I see your mistake. Both the origin and eddy remote write to the same
> > namespace (refs/remotes/origin/*), and that's also why you get (force
> > update) below
>
> Ah, that makes sense.
>
> > . Change the fetch line of remote.eddy.fetch to +refs/heads/*:refs/
> > remotes/eddy/*. After that both command (pull -r / pull -r eddy)
> > should work (I hope).
>
> Okay, so now I have
>
> [branch "master"]
> remote = origin
> merge = refs/heads/master
> [remote "origin"]
> url = git@github.com:janneke/gub.git
> fetch = +refs/heads/*:refs/remotes/origin/*
> # advise from git pull, using <nickname> = eddy
> # branch.master.remote = <nickname>
> # branch.master.merge = <remote-ref>
> # remote.<nickname>.url = <url>
> # remote.<nickname>.fetch = <refspec>
> #[branch "master"]
> # remote = eddy
> # merge = refs/heads/master
> [remote "eddy"]
> url = http://github.com/epronk/gub.git
> #use remote.eddy.fetch to +refs/heads/*:refs/remotes/eddy/*.
> fetch = +refs/heads/*:refs/remotes/eddy/*
>
> It looked promising, but still get
>
> 15:00:20 janneke@peder:~/vc/gub
> $ git pull -r --verbose
> From git@github.com:janneke/gub
> = [up to date] lilypond-release-branch -> origin/lilypond-release-branch
> = [up to date] master -> origin/master
> Current branch master is up to date.
That used the configured defaults.
> 15:00:26 janneke@peder:~/vc/gub
> $ git pull -r --verbose eddy
> From http://github.com/epronk/gub
> = [up to date] lilypond-release-branch -> eddy/lilypond-release-branch
> = [up to date] master -> eddy/master
This one got arguments, so it didn't use defaults.
If you want "git pull" to use the "eddy" remote, then set
branch.<name>.remote to eddy, not to origin.
And as a sidenote:
Using "git pull --rebase" with more than one upstream is most of the
time a very bad idea.
Let's say we have:
A---B---C---D (master)
\ \
\ E---F---G (origin's master)
\
H---I---J (eddy's master)
Now you do "git pull --rebase origin master", which results in:
D' (master)
/
A---B---C---E---F---G (origin's master)
\
H---I---J (eddy's master)
And then you do "git pull eddy master", which will now rebase history
that is not yours:
A---B---C---E---F---G (origin's master)
\
H---I---J (eddy's master)
\
C'--E'--F'--G'--D' (master)
IOW, you get one hell of a mess.
Björn
next prev parent reply other threads:[~2009-11-12 14:56 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-11 13:22 Unhelpful "branch.master.remote = <nickname>" advice? Jan Nieuwenhuizen
2009-11-11 14:08 ` Tomas Carnecky
[not found] ` <1257965806.26362.132.camel@heerbeest>
2009-11-11 19:10 ` Tomas Carnecky
2009-11-11 19:34 ` Jan Nieuwenhuizen
2009-11-11 20:32 ` Tomas Carnecky
2009-11-12 14:17 ` Jan Nieuwenhuizen
2009-11-12 14:53 ` [PATCH] git-pull.sh: overhaul error handling when no candidates are found Jan Krüger
2009-11-12 15:06 ` Jeff King
2009-11-12 15:25 ` Jan Krüger
2009-11-12 15:28 ` Jeff King
2009-11-12 16:08 ` [PATCH v2] git-pull.sh --rebase: " Jan Krüger
2009-11-13 4:07 ` Jonathan Nieder
2009-11-27 14:17 ` [PATCH] pull: clarify advice for the unconfigured error case Jonathan Nieder
2009-12-02 23:08 ` Junio C Hamano
2009-12-03 1:26 ` Jonathan Nieder
2009-12-03 1:43 ` Jeff King
2009-12-03 8:49 ` Jan Nieuwenhuizen
2009-12-03 10:51 ` Jan Krüger
2009-12-07 0:29 ` Junio C Hamano
2009-11-15 9:08 ` [PATCH v2] git-pull.sh --rebase: overhaul error handling when no candidates are found Junio C Hamano
2009-11-12 14:56 ` Björn Steinbrink [this message]
2009-11-12 15:03 ` Unhelpful "branch.master.remote = <nickname>" advice? Tomas Carnecky
2009-11-18 12:29 ` [PATCH] Makefile: add uninstall target. Fixes elementary good cleaning manners Jan Nieuwenhuizen
2009-11-18 13:28 ` Matthieu Moy
2009-11-11 14:13 ` Unhelpful "branch.master.remote = <nickname>" advice? Jan Krüger
2009-11-11 19:54 ` Junio C Hamano
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=20091112145635.GA6721@atjola.homenet \
--to=b.steinbrink@gmx.de \
--cc=git@vger.kernel.org \
--cc=janneke-list@xs4all.nl \
--cc=tom@dbservice.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).