Re: Creating new remote branch in git? - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Creating new remote branch in git?
Date
Msg-id BANLkTinEMCs4srviptzzg0J=4eiG9JE1LQ@mail.gmail.com
Whole thread Raw
In response to Re: Creating new remote branch in git?  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Creating new remote branch in git?
List pgsql-hackers
On Mon, Jun 13, 2011 at 10:54 PM, Bruce Momjian <bruce@momjian.us> wrote:
> Alvaro Herrera wrote:
>> Excerpts from Bruce Momjian's message of lun jun 13 18:38:46 -0400 2011:
>> > Andrew Dunstan wrote:
>>
>> > > Is putting remotes in your ~/.gitconfig  good practice? I certainly
>> > > don't have any in mine.
>> >
>> > Putting 'github' in there allows me to push/pull from github branches
>> > without having to specify the github URL.
>>
>> I think his point is that they are more properly specified in each
>> repo's .git/config file, not the global $HOME/.gitconfig.  If you were
>> to check out some other, unrelated project, you could end up pushing
>> unrelated branches to PG's repo ...  Not sure if this is really
>> possible, but it certainly seems scary to do things that way.
>
> I understand now --- that it is risky to create an "origin" branch in
> ~/.gitconfig.  I am now using an alias:
>
>        [alias]
>                pgclone = clone ssh://git@gitmaster.postgresql.org/postgresql.git
>
> I assume the 'github' branch in ~/.gitconfig is fine.

That, too, would better off inside $REPO/.git/config, although it's
certainly less risky than the other one.  It doesn't make much sense
to have an upstream that applies across every repository you have
checked out.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Make relation_openrv atomic wrt DDL
Next
From: "Kevin Grittner"
Date:
Subject: Re: SSI patch renumbered existing 2PC resource managers??