0
0
Gitdevops~10 mins

Searching history with git log -S - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to search commits that added or removed the word 'fix' in the code.

Git
git log -S '[1]'
Drag options to blanks, or click blank then click option'
Afix
Berror
Cbug
Dupdate
Attempts:
3 left
💡 Hint
Common Mistakes
Using a word not present in the code changes.
Forgetting to put the search word in quotes.
2fill in blank
medium

Complete the command to show the patch (code changes) for commits that added or removed the string 'login'.

Git
git log -S '[1]' -p
Drag options to blanks, or click blank then click option'
Alogout
Buser
Clogin
Dsession
Attempts:
3 left
💡 Hint
Common Mistakes
Using unrelated words that won't match any commit.
Omitting the -p option when patch details are needed.
3fill in blank
hard

Fix the error in the command to search commits that added or removed the string 'config' ignoring case.

Git
git log -S '[1]' -i
Drag options to blanks, or click blank then click option'
Aconfig
BconFig
CConfig
DCONFIG
Attempts:
3 left
💡 Hint
Common Mistakes
Using uppercase or mixed case unnecessarily.
Not using the -i option when case should be ignored.
4fill in blank
hard

Fill both blanks to search commits that added or removed the string 'error' and limit output to 3 commits.

Git
git log -S '[1]' -n [2]
Drag options to blanks, or click blank then click option'
Aerror
B5
C3
D10
Attempts:
3 left
💡 Hint
Common Mistakes
Using a wrong number for the limit.
Using a wrong search string.
5fill in blank
hard

Fill all three blanks to search commits that added or removed the string 'timeout', show patches, and limit output to 2 commits.

Git
git log -S '[1]' [2] -n [3]
Drag options to blanks, or click blank then click option'
A-p
B-i
C2
D-v
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up options for patch and verbose output.
Using wrong numbers for commit limits.