0
0
Gitdevops~10 mins

git log formatting options - 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 with one line per commit.

Git
git log --[1]
Drag options to blanks, or click blank then click option'
Asingleline
Bone-line
Coneline
Dshort
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'one-line' instead of 'oneline' causes an error.
Using 'short' shows a brief log but not one line per commit.
2fill in blank
medium

Complete the command to show the commit history with a custom format showing only the commit hash and message.

Git
git log --pretty=[1]
Drag options to blanks, or click blank then click option'
Afull
Bformat:"%h %s"
Coneline
Dshort
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'full' or 'short' does not customize the output as needed.
Forgetting to include quotes around the format string causes errors.
3fill in blank
hard

Fix the error in the command to show commit logs with author name and date in a custom format.

Git
git log --pretty=[1]
Drag options to blanks, or click blank then click option'
Aformat:"%an %ad"
Bformat:'%an %ad'
Cformat:%an %ad
Dformat="%an %ad"
Attempts:
3 left
💡 Hint
Common Mistakes
Using single quotes inside double quotes can cause shell errors.
Omitting quotes around the format string causes syntax errors.
4fill in blank
hard

Complete the command to show commit logs with abbreviated commit hash and author email.

Git
git log --pretty=[1]
Drag options to blanks, or click blank then click option'
Aformat:"%H %ae"
Bformat:"%H %an"
Cformat:"%h %an"
Dformat:"%h %ae"
Attempts:
3 left
💡 Hint
Common Mistakes
Using %H shows full hash instead of abbreviated.
Mixing author name (%an) instead of email (%ae).
5fill in blank
hard

Complete the command to show commit logs with commit hash, author name, and commit date in ISO format.

Git
git log --pretty=[1] [2]
Drag options to blanks, or click blank then click option'
Aformat:"%h %an %ad"
B--date=iso
C--date=short
D--date=relative
Attempts:
3 left
💡 Hint
Common Mistakes
Using --date=short or --date=relative changes the date format incorrectly.
Not including the --date option results in default date format.