Re: Creating new remote branch in git?

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Greg Smith <greg(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Creating new remote branch in git?
Date: 2011-06-13 18:26:44
Message-ID: 201106131826.p5DIQiq21697@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas wrote:
> On Sun, Jun 12, 2011 at 7:59 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > Tom Lane wrote:
> >> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> >> > Did the system create the .git/config '[branch "REL9_1_STABLE"]' section
> >> > for you or did you create it manually?
> >>
> >> git created them for me. ?I did no config hacking whatever, but now
> >> I have:
> >>
> >> [branch "REL9_1_STABLE"]
> >> ? ? ? remote = origin
> >> ? ? ? merge = refs/heads/REL9_1_STABLE
> >> ? ? ? rebase = true
> >>
> >> which exactly parallels the pre-existing entries for the other branches.
> >>
> >> One point that might affect this is that in ~/.gitconfig I have
> >>
> >> [branch]
> >> ? ? ? autosetuprebase = always
> >>
> >> which is as per the setup recommendations on the wiki page.
> >
> > I have the same in my ~/.gitconfig:
> >
> > ? ? ? ?[branch]
> > ? ? ? ? ? ? ? ?autosetuprebase = always
> >
> > I am attaching my ~/.gitconfig.
> >
> > Do I need to run this in every branch?
> >
> > ? ? ? ?git config branch.master.rebase true
> >
> > Right now our wiki only says to run it in the master branch. ?I am
> > attaching my postgresql/.git/config file too.
>
> This is ironclad evidence that you followed the directions out of
> order, but yes, running that for every branch will fix it.

I found the cause. When I added 'github' to ~/.gitconfig a few months
ago, I copied this line from .git/config:

fetch = +refs/heads/*:refs/remotes/origin/*

If this line is in ~/.gitconfig for both 'origin' and 'github', git
cannot create .git/config entries.

Attached is my corrected ~/.gitconfig file. I now use only the 'url'
branch entries, which is all that is needed.

Thanks.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

Attachment Content-Type Size
unknown_filename text/plain 488 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-06-13 18:29:05 Re: Reminder: 1.5 days to 9.2 CF1
Previous Message Josh Berkus 2011-06-13 18:25:47 Reminder: 1.5 days to 9.2 CF1