Courseiva

200-901 Software Development and Design Practice Question

What does the Git command 'git log --oneline' display?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

A summary of each commit on one line

The --oneline flag condenses each commit to a single line showing the commit hash and message.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    A list of files changed in the last commit

    Why it's wrong here

    'git log --oneline' condenses commit history to one abbreviated hash plus subject line per commit; it does not list changed files. File listings come from 'git show --stat' or 'git log --name-only'. It tempts because commit output often accompanies file changes, but the --oneline flag only alters commit formatting.

  • ✗

    The branches and their latest commits

    Why it's wrong here

    Branch listings come from 'git branch -v' or 'git log --branches'; 'git log --oneline' formats the current branch's commit history, not branch tips. It tempts because both display commit hashes and subjects, so the output looks similar, but the underlying revision selection differs.

  • ✗

    The differences between the working directory and the last commit

    Why it's wrong here

    Working-directory differences are shown by 'git diff', which compares the index or HEAD against unstaged changes. 'git log --oneline' reads committed history only. It tempts because both surface change information, but diff operates on uncommitted state while log traverses the commit graph.

  • ✓

    A summary of each commit on one line

    Why this is correct

    The --oneline flag condenses each commit to its abbreviated SHA-1 hash followed by the commit subject, printing one commit per line. This satisfies the requirement for a compact summary rather than the default multi-line format showing author, date and full message.

About these practice questions

One of 975 original 200-901 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 200-901 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 200-901 exam.