What does the git shortlog command do?

What does the git shortlog command do?

a) Summarizes the commit history by author
b) Displays the full commit history
c) Shows a brief log of remote changes
d) Displays file-level changes

Answer:

a) Summarizes the commit history by author

Explanation:

The git shortlog command provides a summary of the commit history grouped by author. It displays the number of commits each contributor has made, along with their commit messages.

This command is useful for getting an overview of who contributed to the project and how much work they’ve done without going through the entire log.

Understanding git shortlog is helpful for assessing contributions, especially in collaborative projects.

Reference:

Top 100 Git and GitHub MCQ Questions and Answers

Scroll to Top