[Libreoffice] Git detached HEAD (no branch) was: newish to git: howto recover from bad merge?

Christian Lohmaier lohmaier+libreoffice at googlemail.com
Fri Nov 19 16:45:39 PST 2010

Hi *,

On Fri, Nov 19, 2010 at 5:31 PM, Kohei Yoshida <kyoshida at novell.com> wrote:
> On Fri, 2010-11-19 at 19:53 +0900, Takeshi Abe wrote:
>> $ git branch
>> * (no branch)
>>   master
> So, I'd like to expand on this mysterious "detached HEAD" thingie in
> git, [...]

I'll add to that:
Just never ever thing you're smart and git clone that directory first
to try things. When you do, you're screwed once you delete the
original copy, since the clone doesn't know anything about the
branches after that thing anymore, I had to spend too much time to
fixup with that.

detached heads in git are dangerous!!! Don't use them (always name it,
even if it is "stupidnametonotredoeverythingbecauseofdetachedheadmadness").
I learned the hard way…

Especially when you're used to mercurial and thing "what's so bad
about multiple heads, that's a no-brainer": GIT is very different in
this regard. You have been warned.


More information about the LibreOffice mailing list