0
0
Gitdevops~10 mins

Viewing commit history with git log - 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 the commit history in the terminal.

Git
git [1]
Drag options to blanks, or click blank then click option'
Astatus
Bpush
Ccommit
Dlog
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'git status' which shows current changes, not history.
Using 'git commit' which creates a new commit.
Using 'git push' which sends commits to a remote.
2fill in blank
medium

Complete the command to show a simplified one-line commit history.

Git
git log --[1]=oneline
Drag options to blanks, or click blank then click option'
Apretty
Bformat
Cone
Dshort
Attempts:
3 left
💡 Hint
Common Mistakes
Using '--format=oneline' which is incorrect syntax here.
Using '--one=oneline' which is not a valid option.
Using '--short=oneline' which does not exist.
3fill in blank
hard

Fix the error in the command to show the last 3 commits.

Git
git log -n [1]
Drag options to blanks, or click blank then click option'
A-3
Bthree
C3
Dlast
Attempts:
3 left
💡 Hint
Common Mistakes
Using words like 'three' instead of digits.
Using '-3' which is not the correct syntax here.
Using 'last' which is not recognized.
4fill in blank
hard

Fill both blanks to show commit history with author and date.

Git
git log --[1]='format:%h - [2] - %ad'
Drag options to blanks, or click blank then click option'
Apretty
Bauthor
Cdate
Dformat
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'format' instead of 'pretty' for the first blank.
Using 'date' instead of 'author' for the second blank.
Confusing the placeholders with option names.
5fill in blank
hard

Fill all three blanks to show commit history with graph, one line, and all branches.

Git
git log --[1] --[2] --[3]
Drag options to blanks, or click blank then click option'
Agraph
Boneline
Call
Ddecorate
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'decorate' instead of 'all' to show all branches.
Mixing up the order of options.
Using options that don't combine well.