0
0
Gitdevops~5 mins

git log --oneline and --graph - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does the git log --oneline command do?
It shows the commit history in a short format, displaying each commit on one line with its abbreviated commit ID and commit message.
Click to reveal answer
beginner
What is the purpose of the --graph option in git log?
It adds a visual ASCII graph to the commit history output, showing the branching and merging structure of the commits.
Click to reveal answer
intermediate
How do --oneline and --graph work together in git log?
They combine to show a compact, one-line-per-commit history with a visual graph of branches and merges, making it easier to understand the commit structure at a glance.
Click to reveal answer
beginner
What does a vertical line (|) in the git log --graph output represent?
It represents a branch line showing the path of commits in a branch.
Click to reveal answer
intermediate
Why is using git log --oneline --graph helpful when working with multiple branches?
Because it visually shows how branches diverge and merge, helping you understand the project history and relationships between commits quickly.
Click to reveal answer
What does the --oneline option do in git log?
AShows the commit history in reverse order
BShows the full commit message with details
CShows each commit in a single line with abbreviated ID and message
DShows only the commit IDs without messages
What visual element does git log --graph add to the output?
AA color-coded timeline
BA list of changed files
CA summary of commit authors
DAn ASCII graph showing branches and merges
Which command shows a compact commit history with branch structure?
Agit status
Bgit log --oneline --graph
Cgit diff
Dgit branch
In git log --graph, what does a '*' symbol represent?
AA commit point
BA branch name
CA merge conflict
DA deleted file
Why might you use git log --oneline --graph instead of just git log?
ATo see a simpler, visual summary of commits and branches
BTo edit commit messages
CTo delete old commits
DTo push changes to remote
Explain how git log --oneline --graph helps you understand a project's commit history.
Think about how a simple list and a visual graph together improve clarity.
You got /4 concepts.
    Describe the meaning of the symbols and lines you see in the output of git log --graph.
    Focus on how the ASCII characters map to branches and commits.
    You got /4 concepts.