3

I have a branch that I deleted (with -D) but I need it back. I thought the git reflog command would be a good place to look. When I run it I only see 50 actions displayed, and I can't find any commits from this branch. The branch was deleted a day ago, and I was under the impression that it would not be deleted from the reflog for 30 days.

Is there a way to see more entries in the reflog?

Kryptic
  • 1,922
  • 2
  • 21
  • 29

1 Answers1

1

I am unable to answer the specified question. As far as I know git reflog outputs all entries. Anyway, I understand that all you want is to recover the deleted branch.

I suggest you to use git fsck --unreachable. This command outputs all unreachable objects: blobs, trees, commits. Then you can use git show to find the lost commit.

If you are unable to find the lost commit then I have a bad news. It is gone.

Oleksandr Pryimak
  • 1,561
  • 9
  • 11