AZ-400 · Question #424
Drag and Drop Question You have a GitHub repository that contains the code for an app named App1. App1 depends on a library of functions from a repository at https://github.com/contoso/afeed. You need
The correct answer is submodule; add. The correct command is 'git submodule add https://github.com/contoso/afeed', which clones the external repository and registers it as a submodule within the App1 repository. Git submodules allow you to keep a separate Git repository as a subdirectory of another repository, mainta
Question
Answer Area
Drag items
Correct arrangement
- submodule
- add
Explanation
The correct command is 'git submodule add https://github.com/contoso/afeed', which clones the external repository and registers it as a submodule within the App1 repository. Git submodules allow you to keep a separate Git repository as a subdirectory of another repository, maintaining its own history and remote tracking while being linked to the parent repo via a .gitmodules file. This is the standard Git mechanism for embedding a dependency repository as a subdirectory without merging their histories.
Topics
Community Discussion
No community discussion yet for this question.