0

I stupidly aborted a forgotten rebase with commits and uncommitted changes both on top of it, so it blew everything away, similar to questions like this.

I know about the reflog and immediately went to look in there, however it contained only a single hash of a non-useful pre-rebase state. What is going on? How can I lose reflog entries?

EDIT: in response to @kan below, here's roughly what I did:

git checkout badbranch
git rebase master
# CONFLICT, realized branch was bad and not needed anymore, but did not rebase --abort!
git branch -D badbranch
git checkout goodbranch
# some commits and edits here
git commit -av
# notices "you are currently rebasing" in the commit message
git rebase --abort # DOH
git reflog

The reflog only contains a8f06a6 HEAD@{2}: rebase: updating HEAD now

Community
  • 1
  • 1
Arkadiy Kukarkin
  • 2,034
  • 14
  • 23
  • `git fsck` was of no help :( – Arkadiy Kukarkin Apr 02 '14 at 22:03
  • Description quite vague, could you show us history of commands you done? – kan Apr 02 '14 at 22:03
  • Did you `git log` anytime during the rebase? This will sometimes save me. Look back through your terminal buffer for any commit id(s) from the rebase. Create tags for each of them so that `git log` will show them to you (and any commits that came before them). Then look at the full git log and (hopefully) find your missing commits. Than rebase or cherry-pick the missing commits back into master. – Bert F Apr 02 '14 at 22:46
  • Unfortunately I don't have the commit ids in the scrollback. I am starting to suspect that the actual commit objects are somehow lost as well, too. – Arkadiy Kukarkin Apr 02 '14 at 23:20
  • What about the reflog for `goodbranch`? (although there should be reflog entries for `HEAD` too, so this is puzzling) – torek Apr 02 '14 at 23:45
  • The reflogs for all involved branches are like this. It seems like something caused them to spuriously expire? – Arkadiy Kukarkin Apr 03 '14 at 17:46

0 Answers0