nerdexam
Microsoft

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

Submitted by neha2k· Mar 6, 2026Design and implement source control strategies - specifically managing external repository dependencies using Git submodules in Azure DevOps or GitHub workflows

Question

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 to keep a clone of the afeed repository as a subdirectory of the App1 repository. How should you complete the Git command? To answer, drag the appropriate values to the correct targets. Each value may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content. NOTE: Each correct selection is worth one point. Answer:

Answer Area

Drag items

addbranchclonepullsubmodule

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

#Git Submodules#Repository Management#Dependency Management#Version Control

Community Discussion

No community discussion yet for this question.

Full AZ-400 Practice