What does git blame display?

What does git blame display?

a) Shows who made changes to each line of a file
b) Shows a list of uncommitted changes
c) Shows the commit history
d) Shows all remote branches

Answer:

a) Shows who made changes to each line of a file

Explanation:

The git blame command shows who last modified each line of a file, along with the commit hash and author details. It’s useful for tracing the origin of a particular change, especially when debugging or reviewing code history.

For example, running git blame filename will display a breakdown of each line of the file, with information about the commit that last modified it.

This command is crucial for understanding the history of changes made to specific files in a project.

Reference:

Top 100 Git and GitHub MCQ Questions and Answers

Scroll to Top