Re: Re: [PATCH] Docs: git checkout --orphan: `root commit' and `branch head'
- From
Michael Witten <mfwitten@gmail.com>
- Date
- Sep 27, 2011, 23:44 UTC
- Message-ID
- <CAMOZ1BtoaUrk4e4qBtaZLKJWud+_zi-h3WDpRHRXVpW4W-5F4A@mail.gmail.com>
- In-Reply-To
- <20110927233549.GA10434@sigill.intra.peff.net>
On Tue, Sep 27, 2011 at 23:35, Jeff King <peff@peff.net> wrote:
Show 11 quoted lines
> 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 <new_root_commit>", >> 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.