Complete the command to show the commit history in Git.
git [1]The git log command shows the commit history of the repository.
Complete the command to show a one-line summary of each commit in the history.
git log --[1]The --oneline option shows each commit in a single line summary.
Fix the error in the command to show the last 3 commits in the history.
git log -[1] 3
The -n option limits the number of commits shown. So git log -n 3 shows the last 3 commits.
Fill both blanks to create a dictionary comprehension that maps commit hashes to their messages for commits with messages longer than 10 characters.
{commit.[1]: commit.[2] for commit in commits if len(commit.message) > 10}In Git Python libraries, hexsha is the commit hash and message is the commit message.
Fill all three blanks to filter commits with messages containing 'fix' and create a dictionary of commit hashes to authors.
{commit.[1]: commit.[2] for commit in commits if 'fix' in commit.[3].lower()}We use hexsha for commit hash, author for who made the commit, and check if 'fix' is in the message.