Re: Deleting the "current" branch in remote bare repositories
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Feb 7, 2009, 22:05 UTC
- Message-ID
- <94a0d4530902071405m33a0804er8030e14bea205898@mail.gmail.com>
- In-Reply-To
- <20090207162754.5fb8b63f@perceptron>
On Sat, Feb 7, 2009 at 5:27 PM, Jan Krüger <jk@jk.gs> wrote:
Show 25 quoted lines
> Hi everyone, > > recently on IRC we had a case where someone had accidentally deleted > the "current" branch (i.e. thing pointed to by HEAD) by using "git push > origin :master". This broke the remote HEAD as well as the local > refs/remotes/origin/HEAD. Not good. I think we want to make it harder > to get into this situation. > > Personally, without being aware of any potential counterindications, I > think the best solution from a usability point of view would > be to have receive-pack reject deletions of what's currently in HEAD. > The question is, of course: how do we go about situations where someone > actually wants to delete the branch HEAD points at? > > 1. reject deletion and point out a command to change HEAD first (I > don't think we've got a command to do this remotely; do we want one?) > > 2. automatically change HEAD to something else if there's any other > branch (eww) > > 3. accept the deletion but warn the user that she just broke the > repository (especially eww because it also breaks the local tracking > ref) > > Any smart ideas?
This was brought up before: http://marc.info/?l=git&m=123254293910829&w=2
But I don't think it reached any conclusion.
-- Felipe Contreras