0
0
Gitdevops~10 mins

The .git directory structure - Interactive Code Practice

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

Complete the code to show the main directory that stores all Git data.

Git
ls -a | grep [1]
Drag options to blanks, or click blank then click option'
Asrc
Bdocs
C.git
Dbin
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing a regular folder like 'src' or 'bin' instead of the hidden '.git' directory.
2fill in blank
medium

Complete the command to list the contents inside the .git directory.

Git
ls [1]/.git
Drag options to blanks, or click blank then click option'
A/var/log
B/home/user/project
C..
D.
Attempts:
3 left
💡 Hint
Common Mistakes
Using an absolute path that may not exist or is unrelated.
Using '..' which points to the parent directory.
3fill in blank
hard

Fix the error in the command to show the HEAD file inside the .git directory.

Git
cat [1]/HEAD
Drag options to blanks, or click blank then click option'
A.git
Bgit
Chead
DHEAD
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'git' without the dot, which is not the correct directory.
Using 'HEAD' as a directory instead of a file.
4fill in blank
hard

Fill both blanks to create a command that shows the contents of the config file inside the .git directory.

Git
cat [1]/[2]
Drag options to blanks, or click blank then click option'
A.git
Bconfig
CHEAD
Drefs
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'HEAD' or 'refs' instead of 'config' for the file name.
Omitting the dot in '.git'.
5fill in blank
hard

Fill all three blanks to create a command that lists files inside the info subdirectory of the objects directory within .git.

Git
ls [1]/[2]/[3]
Drag options to blanks, or click blank then click option'
A.git
Bobjects
Cinfo
Drefs
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'refs' instead of 'info' as the last directory.
Omitting the dot in '.git'.