0
0
Gitdevops~10 mins

Removing submodules in Git - Interactive Code Practice

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

Complete the command to remove a git submodule directory.

Git
git rm --cached [1]
Drag options to blanks, or click blank then click option'
Asubmodule_branch
Bsubmodule_name
Csubmodule_url
Dsubmodule_path
Attempts:
3 left
💡 Hint
Common Mistakes
Using the submodule name instead of its path.
Trying to remove the submodule URL instead of the directory.
2fill in blank
medium

Complete the command to remove the submodule entry from the git configuration.

Git
git config --remove-section [1]
Drag options to blanks, or click blank then click option'
Asubmodule.url
Bsubmodule.submodule_name
Csubmodule.submodule_path
Dsubmodule.branch
Attempts:
3 left
💡 Hint
Common Mistakes
Removing the wrong config section like just 'submodule.name'.
Using the URL instead of the path in the config section.
3fill in blank
hard

Fix the error in the command to remove the submodule directory from the working tree.

Git
rm -rf [1]
Drag options to blanks, or click blank then click option'
Asubmodule_name
Bsubmodule_path
C.git/config
D.gitmodules
Attempts:
3 left
💡 Hint
Common Mistakes
Trying to delete .gitmodules or .git/config instead of the submodule folder.
Using the submodule name instead of its path.
4fill in blank
hard

Fill both blanks to update the git index and remove the submodule directory.

Git
git rm --cached [1] && rm -rf [2]
Drag options to blanks, or click blank then click option'
Asubmodule_path
Bsubmodule_name
Dsubmodule_url
Attempts:
3 left
💡 Hint
Common Mistakes
Using different values for the two blanks.
Using submodule name or URL instead of path.
5fill in blank
hard

Fill all three blanks to fully remove a git submodule.

Git
git rm --cached [1] && rm -rf [2] && git config --remove-section [3]
Drag options to blanks, or click blank then click option'
Asubmodule_path
Csubmodule.submodule_path
Dsubmodule_name
Attempts:
3 left
💡 Hint
Common Mistakes
Using submodule name instead of path for the first two blanks.
Not including 'submodule.' prefix in the config section name.