Courseiva
Design and implement a source control strategyeasyMultiple ChoiceObjective-mapped

AZ-400 Practice Question: Design and implement a source control strategy

Your development team uses GitHub Enterprise and wants to automatically synchronize code from a public GitHub repository to their private repository every morning. What feature should they use?

⚠ Common exam trap

Many exam-takers assume webhooks (Option A) are the only way to trigger automation, forgetting that webhooks require external network access and cannot be sent from a public repo to a private GitHub Enterprise instance without a proxy or custom relay.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

A scheduled GitHub Actions workflow that fetches from the public repo and pushes to the private repo.

B is correct because a scheduled GitHub Actions workflow can periodically fetch changes from the public repository (using `git fetch` or `git pull`) and push them to the private repository. This approach avoids the need for external triggers and works even when the public repo does not send webhooks to your private environment. The schedule is defined using cron syntax in the workflow YAML, ensuring automatic daily synchronization.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Webhooks from the public repository to trigger a sync pipeline.

    Why it's wrong here

    Webhooks from the public repository can only trigger on repository events such as pushes or pull requests, not on a time-based schedule. If the public repo receives no activity, the sync pipeline will never run, so this approach cannot guarantee periodic synchronization as required.

  • A scheduled GitHub Actions workflow that fetches from the public repo and pushes to the private repo.

    Why this is correct

    A scheduled GitHub Actions workflow uses the `on: schedule` event with cron syntax to run at specified intervals. The workflow can fetch the latest commits from the public repository and then push them to the private repository, providing a fully automated and time-controlled sync mechanism.

  • Git submodules to link the public repository as a subdirectory.

    Why it's wrong here

    Git submodules allow you to embed a specific commit of the public repository as a subdirectory, but the submodule pointer must be manually updated and committed each time the upstream changes. There is no automatic synchronization of the latest code, so this does not meet the requirement of an automated recurring sync.

  • GitHub repository mirroring to automatically mirror the public repo.

    Why it's wrong here

    Repository mirroring (e.g., `git push --mirror` or GitHub's built-in mirroring feature) copies all refs and branches, but GitHub's built-in mirroring is either a one-time import or a continuous event-driven sync—it does not natively support cron-based scheduling. Without an external orchestrator (like GitHub Actions) to trigger the mirror at specified intervals, you cannot guarantee the sync runs at the required times, so this option fails the explicit scheduled recurring requirement.

About these practice questions

This AZ-400 question is part of Courseiva's 823-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AZ-400 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-400 exam.