← Quiz: Searching Git History: all 10 questions
Quiz: Searching Git History · Question 2 of 10
You want to know when the code discount = 0.5 was added to the project. What is the best tool?
You want to know when the code discount = 0.5 was added to the project. What is the best tool?
- A.git log --grep="discount"
- B.git shortlog -sn
- C.git log -S"discount = 0.5"
- D.git status
Answer & explanation
Correct answer: git log -S"discount = 0.5"
The pickaxe finds commits where that exact text was added or removed in the code.
Can you get the rest right without peeking?
Take the timed Quiz: Searching Git History quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →