Re: Caution when removing git branches

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Caution when removing git branches
Date: 2011-01-26 16:44:23
Message-ID: 201101261644.p0QGiNY21271@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan 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.

Yes, I did that for the contrib-links patch I posted to my github, and
it was easy, and nice to be able to post incremental diffs as I modified
things. I have just deleted that branch locally and on github, which
was easy, and got me thinking about accidental deletion on the origin.

> I thought we had some hooks on gitmaster to help prevent accidents like
> inadvertent branch deletion.

That would be nice.

> I at least still keep rolling backups of the main repo. I'm sure I'm not
> alone.

OK, thanks.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-01-26 16:47:39 Re: [COMMITTERS] pgsql: Remove arbitrary ALTER TABLE .. ADD COLUMN restriction.
Previous Message Robert Haas 2011-01-26 16:43:13 Re: Caution when removing git branches