On Sat, Feb 7, 2009 at 5:27 PM, Jan Krüger <jk@xxxxx> wrote: > 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 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html