Complete the command to show the reflog entries.
git [1]The git reflog command shows the history of HEAD changes, helping find lost commits.
Complete the command to reset the current branch to a lost commit found in reflog.
git reset --hard [1]The syntax HEAD@{3} refers to the third previous position of HEAD in reflog.
Fix the error in the command to show reflog with commit hashes and messages.
git reflog [1] --oneline--format without --pretty or using unrelated options.The --pretty option customizes the output format, including showing commit hashes and messages.
Fill both blanks to create a command that shows reflog entries with timestamps and author info.
git reflog [1] [2]
--oneline which lacks detailed info.The --pretty=format:'%h %ad %an %s' shows hash, date, author, and message. The --date=iso formats the date nicely.
Fill all three blanks to create a command that recovers a lost commit by creating a new branch at that commit.
git branch [1] [2] && git checkout [3]
This command creates a new branch named recovered-branch at the lost commit HEAD@{5} and then switches to it.