From: Michael Witten Date: Tue, 27 Sep 2011 23:44:33 GMT Subject: Re: Re: [PATCH] Docs: git checkout --orphan: `root commit' and `branch head' Message-ID: In-Reply-To: <20110927233549.GA10434@sigill.intra.peff.net> On Tue, Sep 27, 2011 at 23:35, Jeff King wrote: > On Tue, Sep 27, 2011 at 11:28:14PM +0000, Michael Witten wrote: > >>   With "git commit --no-parent", you would be altering the current >>   branch head, which means you are potentially leaving as a dangling >>   commit the commit to which that branch head originally pointed. >>   I.e., it is about as dangerous as "git reset --hard ", >>   something for which we do NOT provide any protection. > > Didn't I already mention that example? And then say that I think the > lack of protection there has been the source of a lot of confusion and > hardship? Sorry, I suppose you did already mention that, but: * I missed it because of the footnote. * There is more pedantry to my text than just that. > Repeating the problems of "git reset" does not seem like a good idea to > me. Especially not with a command like "commit", which is usually very > safe. I think that "git reset" is confusing and dangerous for more fundamental reasons: It's another one of git's bizarre, poorly chosen abstractions on top of the working tree and index.