Re: --orphan erases HEAD reflog
- From
SZEDER Gábor <szeder@ira.uka.de>
- Date
- Jun 3, 2016, 20:38 UTC
- Message-ID
- <20160603203818.7654-1-szeder@ira.uka.de>
- In-Reply-To
- <f51f9df7-d6d7-3a45-736f-ca2e2c9eb2cb@textalk.se>
Show 6 quoted lines
> after running the command: > > git checkout --orphan fuleFix > > my HEAD reflog is emptied. > I would like to have my reflog intact :)
No worries, your reflog is still intact :) It's just the reflog walker stopping prematurely upon encountering the null sha1 of the new root commit's reflog entry. Patch follows in a minute.
Of course you still won't be able to list the reflog right after 'git checkout --orphan', because HEAD is invalid. You have to create a new root commit or switch to an existing branch first.
Gábor