Re: [Question] Git recovery with HEAD commit broken

2013-12-11 Thread Jonathan Nieder
Joey Hess wrote: > [2] A particularly annoying one is that git branch -d cannot be used > to remove a branch that is directly pointing to a corrupted commit! It's generally considered okay for everyday commands like "git branch -d" not to cope well with corrupted repositories, but we try to k

Re: [Question] Git recovery with HEAD commit broken

2013-12-11 Thread Joey Hess
Matthieu Moy wrote: > Not as far as I know. But "git fsck" has a --lost-found option that can > help recovering unreachable (dangling) commits. > > You may have a look at http://hackage.haskell.org/package/git-repair but > I do not think it would solve your particular case. Well, let's find out..

Re: [Question] Git recovery with HEAD commit broken

2013-12-11 Thread Matthieu Moy
Shilong Wang writes: > A power off cause my top commit broken, and then git > branch/log/reflog..etc won't work. With a bit of luck, the reflog actually contain useful information. Look at .git/logs/HEAD (or refs/heads/* instead of HEAD for branches' reflog). It's a human-readable text format. Y