Re: best git practices, was Re: Git User's Survey 2007 unfinished summary continued
- From
Andreas Ericsson <ae@op5.se>
- Date
- Oct 25, 2007, 17:10 UTC
- Message-ID
- <4720CE1F.3030902@op5.se>
- In-Reply-To
- <20071025145132.GA31196@diana.vm.bytemark.co.uk>
Karl Hasselström wrote:
Show 14 quoted lines
> On 2007-10-25 14:46:54 +0200, Andreas Ericsson wrote: > >> error: The branch 'next' is not a strict subset of your current >> HEAD. If you are sure you want to delete it, run 'git branch -D >> next'. >> >> So you want me to tell all the developers they should use "git >> branch -D maint" instead, so they can bypass the built-in security >> checks? No thanks. > > Maybe the solution here is to let "git branch -d" succeed if the > branch is a subset of HEAD or the branch it is tracking? That way, > deleting would succeed if upstream has all your commits. >
Deleting branches sitting on a ref reachable from any other locally checked out branch certainly works. Since this is done to protect commits from being pruned, and prune honors remote tracking branches when deciding which commits are unreachable, I see no harm in letting branches pointing to commits reachable from any remote tracking branch be deleted.
-- Andreas Ericsson andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231