0
0
Gitdevops~10 mins

Why submodules manage nested repos in Git - Test Your Understanding

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

Complete the command to add a submodule to your Git repository.

Git
git submodule [1] https://github.com/example/repo.git
Drag options to blanks, or click blank then click option'
Aadd
Bclone
Cinit
Dupdate
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'clone' instead of 'add' will clone a repo but not add it as a submodule.
2fill in blank
medium

Complete the command to initialize submodules after cloning a repository.

Git
git submodule [1]
Drag options to blanks, or click blank then click option'
Aadd
Bcommit
Cclone
Dinit
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'add' again instead of 'init' after cloning.
3fill in blank
hard

Fix the error in the command to update submodules recursively.

Git
git submodule update --[1]
Drag options to blanks, or click blank then click option'
Ainit
Brecursive
Cclone
Dcommit
Attempts:
3 left
💡 Hint
Common Mistakes
Using '--init' instead of '--recursive' will not update nested submodules.
4fill in blank
hard

Fill both blanks to create a submodule and initialize it.

Git
git submodule [1] https://github.com/example/repo.git && git submodule [2]
Drag options to blanks, or click blank then click option'
Aadd
Binit
Cupdate
Dclone
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'clone' instead of 'add' or 'update' instead of 'init'.
5fill in blank
hard

Fill all three blanks to update submodules recursively and initialize them.

Git
git submodule [1] && git submodule [2] --[3]
Drag options to blanks, or click blank then click option'
Aupdate
Brecursive
Cinit
Dadd
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up 'add' with 'update' or missing the '--recursive' flag.