Recall & Review
beginner
What does the
git blame command do?It shows who last changed each line in a file, along with the commit details and timestamp.
Click to reveal answer
beginner
How can you use
git blame to see changes for a specific file?Run
git blame filename to see line-by-line history for that file.Click to reveal answer
beginner
What information does each line in
git blame output include?It includes the commit hash, author name, date, and the actual line content.
Click to reveal answer
intermediate
How can
git blame help when debugging?It helps identify who introduced a change and when, making it easier to ask questions or fix bugs.
Click to reveal answer
intermediate
What option can you add to
git blame to ignore whitespace changes?Use
git blame -w filename to ignore whitespace-only changes in the history.Click to reveal answer
What does
git blame primarily show?✗ Incorrect
git blame shows the last person who changed each line in a file.
Which command shows line-by-line history for a file named
app.js?✗ Incorrect
git blame app.js shows who changed each line in app.js.
What extra info does
git blame show besides the author?✗ Incorrect
It shows commit hash, author, date, and the line content.
How do you ignore whitespace changes in
git blame?✗ Incorrect
The -w option ignores whitespace-only changes.
Why is
git blame useful in debugging?✗ Incorrect
Knowing who changed a line helps understand and fix bugs faster.
Explain how
git blame helps you understand the history of a file.Think about how knowing who changed each line can help.
You got /4 concepts.
Describe the command and option to ignore whitespace changes when using
git blame.Look for a flag that starts with a dash and relates to whitespace.
You got /3 concepts.