Skip site navigation (1) Skip section navigation (2)

Re: Caution when removing git branches

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Caution when removing git branches
Date: 2011-01-27 16:25:19
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Thu, Jan 27, 2011 at 11:13 AM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
> On Wed, Jan 26, 2011 at 17:37, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>> On 01/26/2011 11:26 AM, Bruce Momjian 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 ability to remove branches is a feature. I strongly encourage you to
>> create topic branches for development work, then merge them onto the main
>> branch, and then delete them. I almost never work directly on, say,
>> REL9_0_STABLE or master, except for quite trivial changes.
>> I thought we had some hooks on gitmaster to help prevent accidents like
>> inadvertent branch deletion.
> We have hooks to prevent a number of things, but not the removal of
> branches (or tags). We'll send an email to committers telling you it's
> been done, but we don't prevent it.
> It would probably be pretty easy to add a hook preventing it though -
> do we want that? (we could still delete branches of course - but it
> would require an admin to do it directly on the git server, which is
> highly unlikely to happen by mistake)

I think it's highly unlikely to happen by mistake as it is.

Robert Haas
The Enterprise PostgreSQL Company

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2011-01-27 16:29:24
Subject: Re: Caution when removing git branches
Previous:From: Robert HaasDate: 2011-01-27 16:24:39
Subject: Re: ALTER TYPE 3: add facility to identify further no-work cases

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group