Re: Creating new remote branch in git?

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Greg Smith <greg(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Creating new remote branch in git?
Date: 2011-06-14 12:42:16
Message-ID: BANLkTimDvbxtHNRrKumfzG=1mNgj+c3H5A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 14, 2011 at 14:40, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> Robert Haas wrote:
>> On Mon, Jun 13, 2011 at 10:54 PM, Bruce Momjian <bruce(at)momjian(dot)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(at)gitmaster(dot)postgresql(dot)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.
>
> Wouldn't I conceivably use github with a variety of projects?  I try to
> use ~/.gitconfig so I don't have to redo a lot of stuff when I reinstall
> my PG git tree.

Yes, but your reference goes to a specific repository at github
(bmomjian/postgres). Which wouldn't be correct for any other
project...

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2011-06-14 12:44:32 Re: Creating new remote branch in git?
Previous Message Bruce Momjian 2011-06-14 12:40:09 Re: Creating new remote branch in git?