Kryptic
Kryptic

Reputation: 1952

How do you increase the number of entries output by git reflog?

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?

Upvotes: 4

Views: 4764

Answers (1)

Oleksandr Pryimak
Oleksandr Pryimak

Reputation: 1581

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.

Upvotes: 2

Related Questions