0
0
Gitdevops~10 mins

git log --oneline and --graph - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to show a simple list of commits with one line each.

Git
git log [1]
Drag options to blanks, or click blank then click option'
A--oneline
B--graph
C--stat
D--patch
Attempts:
3 left
💡 Hint
Common Mistakes
Using --graph instead of --oneline shows a graph, not a simple list.
2fill in blank
medium

Complete the command to show a graphical representation of the commit history.

Git
git log [1]
Drag options to blanks, or click blank then click option'
A--oneline
B--patch
C--graph
D--stat
Attempts:
3 left
💡 Hint
Common Mistakes
Using --oneline only shortens commits but does not show a graph.
3fill in blank
hard

Fix the error in the command to show a compact graph with one line per commit.

Git
git log [1] --graph
Drag options to blanks, or click blank then click option'
A--oneline
B--patch
C--stat
D--name-only
Attempts:
3 left
💡 Hint
Common Mistakes
Using --patch or --stat adds too much detail, not a compact view.
4fill in blank
hard

Fill both blanks to create a command that shows one line per commit and colors the output.

Git
git log [1] [2]
Drag options to blanks, or click blank then click option'
A--oneline
B--color
C--graph
D--name-status
Attempts:
3 left
💡 Hint
Common Mistakes
Using --graph instead of --color will add a graph but no color.
5fill in blank
hard

Fill all three blanks to create a command that shows a colored graph with one line per commit and shows the author name.

Git
git log [1] [2] --pretty=format:'%h - %an - %s' [3]
Drag options to blanks, or click blank then click option'
A--oneline
B--color
C--graph
D--stat
Attempts:
3 left
💡 Hint
Common Mistakes
Using --stat adds file change stats, which is not needed here.