Complete the command to search commits that added or removed the word 'fix' in the code.
git log -S '[1]'
The -S option in git log searches for commits that added or removed the specified string. Here, 'fix' is the target word.
Complete the command to show the patch (code changes) for commits that added or removed the string 'login'.
git log -S '[1]' -p
-p option when patch details are needed.The -p option shows the patch (code differences) for each commit found by the -S search.
Fix the error in the command to search commits that added or removed the string 'config' ignoring case.
git log -S '[1]' -i
-i option when case should be ignored.The -i option makes the search case-insensitive, so the exact case of the string in the command does not matter. Using lowercase 'config' is standard.
Fill both blanks to search commits that added or removed the string 'error' and limit output to 3 commits.
git log -S '[1]' -n [2]
The -S option searches for the string 'error'. The -n option limits the number of commits shown; here, 3 commits.
Fill all three blanks to search commits that added or removed the string 'timeout', show patches, and limit output to 2 commits.
git log -S '[1]' [2] -n [3]
-S 'timeout' searches for the string 'timeout'. -p shows the patch (code changes). -v shows the commit message verbosely. -n 2 limits output to 2 commits.