From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Caution when removing git branches |
Date: | 2011-01-26 16:49:29 |
Message-ID: | 201101261649.p0QGnTI21805@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Robert Haas wrote:
> On Wed, Jan 26, 2011 at 11:26 AM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > For those of you using git, I wanted to point out that it is fairly easy
> > to remove git branches. ?For example, I can easily remove a branch on
> > my github repository using:
> >
> > ? ? ? ?$ git branch -d :branch_name
> >
> > I don't believe that is revertable. ?What is scarey is that this could
> > be done on our 'origin' as well.
>
> The colon in that syntax is flat wrong. But branch deletes won't
Sorry, I was wrong. The syntax is:
pggit push github :branch_name
which is even easier to mistype.
> automatically propagate between repositories. I do things like this
> all the time:
>
> git branch -d REL8_4_STABLE
>
> Doesn't delete it from the master at all, and I can recreate it
> whenever I like using:
>
> git checkout REL8_4_STABLE
>
> In fact, even I do this, it's harmless:
>
> git branch -r -D origin/REL8_4_STABLE
>
> Because it'll be undone the next time I do this:
>
> git pull
Wow, that removes it just from your local tree --- interesting.
> Now, there IS an incantation to destroy a branch from the upstream
> repository (using git push with an argument) but even if that
> happened, it wouldn't propagate to cloned copies, so someone else
> could easily put it back.
OK, thanks.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2011-01-26 17:02:36 | Re: Caution when removing git branches |
Previous Message | Tom Lane | 2011-01-26 16:47:39 | Re: [COMMITTERS] pgsql: Remove arbitrary ALTER TABLE .. ADD COLUMN restriction. |