0
0
Gitdevops~10 mins

git cat-file to inspect objects - 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 type of a Git object by its hash.

Git
git cat-file -t [1]
Drag options to blanks, or click blank then click option'
Aobject_hash
Bcommit
Cbranch_name
Dfile_name
Attempts:
3 left
💡 Hint
Common Mistakes
Using a branch name instead of the object hash.
Using a file name instead of the object hash.
2fill in blank
medium

Complete the command to display the content of a Git object by its hash.

Git
git cat-file -[1] object_hash
Drag options to blanks, or click blank then click option'
Al
Bt
Cs
Dp
Attempts:
3 left
💡 Hint
Common Mistakes
Using -t which only shows the type.
Using -s which shows the size.
3fill in blank
hard

Fix the error in the command to show the size of a Git object by its hash.

Git
git cat-file -[1] object_hash
Drag options to blanks, or click blank then click option'
At
Bs
Cp
Dc
Attempts:
3 left
💡 Hint
Common Mistakes
Using -p which prints content.
Using -t which shows type.
4fill in blank
hard

Fill both blanks to create a command that verifies if an object exists and shows its type.

Git
git cat-file --[1] [2]
Drag options to blanks, or click blank then click option'
Abatch-check
Bobject_hash
Cbatch
Dcommit
Attempts:
3 left
💡 Hint
Common Mistakes
Using --batch instead of --batch-check.
Using a commit message instead of an object hash.
5fill in blank
hard

Fill both blanks to create a command that shows the content of a commit object by its hash.

Git
git cat-file -[1] [2]
Drag options to blanks, or click blank then click option'
Ap
Bcommit
Cobject_hash
Dt
Attempts:
3 left
💡 Hint
Common Mistakes
Using -t which only shows type.
Using a branch name instead of the object hash.