Recall & Review
beginner
What does the
--oneline option do in git log?It shows each commit as a single line with the commit hash and the commit message summary, making the log shorter and easier to read.
Click to reveal answer
beginner
How does the
--graph option enhance the git log output?It adds a text-based graph showing the branch structure and merges, helping visualize the commit history.
Click to reveal answer
intermediate
What is the purpose of the
--pretty=format:"%h - %an, %ar : %s" option?It customizes the log output to show the short commit hash, author name, relative date, and commit message in a specific format.
Click to reveal answer
intermediate
Explain the difference between
--stat and --patch options in git log.--stat shows a summary of changed files and lines added or removed. --patch shows the full changes (diff) made in each commit.Click to reveal answer
beginner
What does the
--abbrev-commit option do in git log?It shortens the commit hash to a shorter unique prefix, making the log output more compact.
Click to reveal answer
Which
git log option shows a simple one-line summary per commit?✗ Incorrect
The
--oneline option condenses each commit to a single line with a short hash and message.What does the
--graph option add to the git log output?✗ Incorrect
The
--graph option draws a text-based graph showing branches and merges.Which option shows the detailed changes made in each commit?
✗ Incorrect
--patch shows the full diff of changes in each commit.How can you customize the output format of
git log?✗ Incorrect
The
--pretty=format:"..." option lets you define exactly what information to show and how.What does
--abbrev-commit do?✗ Incorrect
--abbrev-commit shortens commit hashes to a unique prefix.Describe three different ways to format the output of
git log and what each shows.Think about simple, visual, and custom formats.
You got /3 concepts.
Explain the difference between
--stat and --patch options in git log.One shows summary, the other shows details.
You got /2 concepts.