Re: Creating new remote branch in git?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Creating new remote branch in git?
Дата
Msg-id 201106131826.p5DIQiq21697@momjian.us
обсуждение исходный текст
Ответ на Re: Creating new remote branch in git?  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Creating new remote branch in git?  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Robert Haas wrote:
> On Sun, Jun 12, 2011 at 7:59 PM, Bruce Momjian <bruce@momjian.us> wrote:
> > Tom Lane wrote:
> >> Bruce Momjian <bruce@momjian.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@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +
[user]
    name = Bruce Momjian
    email = bruce@momjian.us
[core]
    excludesfile = "/u/postgres/.gitignore"
    editor = "emastd"
    pager = "less -x4 -E"
[diff]
    external = git-external-diff
[remote "origin"]
    url = ssh://git@gitmaster.postgresql.org/postgresql.git
# Do not add the next line or .git/config is not updated.
#    fetch = +refs/heads/*:refs/remotes/origin/*
[remote "github"]
    url = git@github.com:bmomjian/postgres.git
[branch]
    autosetuprebase = always
    rebase = true
[gc]
    auto = 0

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Reminder: 1.5 days to 9.2 CF1
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Reminder: 1.5 days to 9.2 CF1