Re: Creating new remote branch in git?

Поиск
Список
Период
Сортировка
От Alex Hunsaker
Тема Re: Creating new remote branch in git?
Дата
Msg-id BANLkTimRSoHGM==TpLeRmsPnc0vy9DwEcQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Creating new remote branch in git?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Creating new remote branch in git?  (Greg Smith <greg@2ndQuadrant.com>)
Список pgsql-hackers
On Thu, Jun 9, 2011 at 22:02, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Alex Hunsaker <badalex@gmail.com> writes:
>> On Thu, Jun 9, 2011 at 21:05, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> In the next couple of days it's going to be time to branch off
>>> REL9_1_STABLE from master, and I realized that I am pretty foggy on
>>> how to do that in git.  I suppose it's some variant of
>>>
>>> git checkout master             # if not there already
>>> git branch REL9_1_STABLE
>>> git push origin REL9_1_STABLE
>>>
>>> but it's not clear to me whether any options are needed to ensure that
>>> the right branch tracking behavior gets set up.
>
>> That looks right, and yeah that won't setup that branch to track
>> upstream for you. However, it should work for anyone that gets that
>> branch as part of a fetch/pull. ( that is it will work like any other
>> remote branch )
>
> So creating the branch trashes my own repo?  Surely there's a better
> way.

I dunno where you got trashes from. I must have worded that poorly. It
won't break anything, it just won't "track" origin/upstream.

It looks like if you push the remote branch first everything should work nicely:
git checkout master
git push origin origin:refs/heads/REL9_1_STABLE
git fetch # fetch the new branch
git checkout REL9_1_STABLE


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

Предыдущее
От: Joe Abbate
Дата:
Сообщение: Re: Creating new remote branch in git?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Creating new remote branch in git?