4 of the 11 questions we have for this objective, shown with the answer and the reasoning.
Configure and manage repositories
Wingtip Toys has a 60 GB monorepo named wingtip-toys/wingtip-mono on GitHub Enterprise Cloud with 15 years of history and more than 200,000 files. Developers on the web team work only in src/web and shared/ui, but they regularly run git log and git blame across the full commit history. Clone and checkout times must drop significantly without losing access to the full history.
Which two actions should the web team perform? Each correct answer presents part of the solution.
- AClone with git clone --filter=blob:none to create a blobless partial cloneA blobless partial clone downloads all commits and trees but fetches file contents on demand, so the full history stays available for git log while the initial download shrinks.
- BClone with git clone --depth 1A shallow clone truncates history to the latest commit, which breaks the requirement to run git log and git blame across the full history.
- CRun git sparse-checkout set --cone src/web shared/uiCone-mode sparse checkout limits the working tree to the listed directories, so checkout and status operate on a fraction of the 200,000 files.
- DRun git lfs migrate import --everything --include="*.js"LFS migration rewrites history for large binary files; moving source code into LFS does not reduce the working tree and makes diffs and blame on those files impractical.
- ESplit src/web into a separate repository and add it back to wingtip-mono as a submoduleSplitting the repository is a disruptive restructuring that changes the workflow for every team and does not by itself shorten clone time for the web team.
Why: Large monorepos are scaled by reducing what Git downloads and what it materializes on disk. Partial clone with --filter=blob:none keeps every commit and tree, so history commands work, and pulls file contents only when needed. Sparse checkout in cone mode then limits the working directory to the folders a developer actually uses. Shallow clone is the classic trap because it is faster but discards history, which the scenario requires. Scalar automates exactly this combination plus background maintenance.
Configure and manage repositories
Coho Winery has a GitHub organization with a repository named cellar-app. A project coordinator needs to label, assign, close, and reopen issues and pull requests and mark duplicates, but must not be able to push code to any branch. Least privilege is required.
Which repository role should you assign to the project coordinator?
- AReadRead allows viewing and commenting but not applying labels, assigning, or closing other people's issues and pull requests.
- BTriageTriage lets a user manage issues and pull requests, including labels, assignees, and closing or reopening, without any write access to code.
- CWriteWrite includes pushing to branches, which exceeds what the coordinator needs and violates least privilege.
- DMaintainMaintain adds code push rights and some repository settings management, which is far beyond the requirement.
Why: GitHub organization repositories have five base roles: Read, Triage, Write, Maintain, and Admin, each including the rights of the one below it. Triage was designed for people who manage issues and pull requests without contributing code, such as coordinators and community managers. Write is the first role that can push to the repository, so it is the boundary the scenario must not cross. Choosing the lowest role that satisfies the tasks is the least-privilege principle applied to GitHub roles.
Configure and manage repositories
Fourth Coffee maintains a .NET library named FourthCoffee.Telemetry in its own Azure Repos repository. Six application repositories consume the library, and each application team must be able to choose when to upgrade to a new library version, roll back to a previous version, and see which version they are on from their project file. Builds of the applications must not need access to the library's source code.
How should you share the library across the repositories?
- AAdd the library repository as a Git submodule in each application repositoryA submodule pins a commit SHA rather than a semantic version, requires every build to fetch the library source, and adds submodule commands to every developer's workflow.
- BUse git subtree to copy the library source into each application repositorySubtree copies the full library source into each repository, so builds still compile the source and version selection becomes a merge exercise rather than a reference change.
- CMerge all six application repositories and the library into a single monorepoA monorepo forces every application onto the same library version at all times, which removes each team's ability to upgrade on its own schedule.
- DBuild the library in a pipeline that publishes semantically versioned NuGet packages to an Azure Artifacts feed, and have each application reference a specific package versionPackage feeds deliver compiled, versioned artifacts, so each team pins, upgrades, or rolls back by changing the PackageReference version, and no source access is needed at build time.
Why: Cross-repository sharing has three common mechanisms: submodules, subtrees, and package feeds. Submodules and subtrees share source code and track commits, which suits tightly coupled code that consumers also edit. When consumers need independent upgrade timing, clear version numbers, and compiled artifacts, a package feed such as Azure Artifacts or GitHub Packages is the right design. The deciding constraints are per-team version selection and builds without library source, both of which point to packages.
Configure and manage repositories
Margie's Travel releases version 3.2.0 of the Azure Repos repository itinerary-svc from commit with the placeholder SHA 5be09a4. Compliance requires every release marker to record who created it, when it was created, and a release message, and the marker must be visible to everyone who fetches from the server. The release pipeline triggers on tags that match v*.
Which commands should you run?
- Agit tag v3.2.0 5be09a4 followed by git push origin v3.2.0This creates a lightweight tag, which is only a pointer to the commit and stores no tagger, date, or message, so it fails the compliance requirement.
- Bgit tag -a v3.2.0 5be09a4 -m "Release 3.2.0" followed by git pushThe annotated tag is correct, but a plain git push does not push tags by default, so the tag stays local and the pipeline never sees it.
- Cgit branch release/v3.2.0 5be09a4 followed by git push origin release/v3.2.0A branch is a movable reference that records no tagger or message and does not match the v* tag trigger.
- Dgit tag -a v3.2.0 5be09a4 -m "Release 3.2.0" followed by git push origin v3.2.0An annotated tag is a full Git object that stores the tagger name, email, date, and message, and pushing the tag explicitly publishes it to the server where the v* trigger fires.
Why: Git has two kinds of tags. Lightweight tags are just names for a commit, while annotated tags are stored as objects with tagger identity, date, and a message, and they can also be signed. Release markers that must be auditable should always be annotated. Tags are not transferred by git push unless you push them explicitly by name or with an option such as --follow-tags, which is a common reason a tag-triggered pipeline does not run.