AZ-400 Question 80
Select 2You are the DevOps lead for a large organization that maintains a monolithic Git repository containing extensive source code and large binary files. Developers frequently report slow clone and fetch operations. In addition, certain components need to be shared with other related repositories without duplicating the code base. You plan to design a strategy to scale and optimize the main repository while enabling cross-repository sharing. Which two of the following actions should you include in your solution?
- A
Implement Scalar to manage background maintenance tasks and accelerate Git operations in the large repository
- B
Utilize cross-repository submodules to reference shared components without duplicating code
- C
Disable all Git garbage collection processes to reduce repository overhead
- D
Move large binary files directly into the repo to keep everything in one place
- E
Require each developer to maintain a separate clone for each shared component repo
Show answer and explanation
Correct answers: A, B
Explanation
To effectively scale a large Git repository and improve performance, teams can leverage Scalar for automated maintenance tasks like commits, fetches, and background operations. This significantly reduces the overhead of dealing with large or monolithic repositories. Additionally, cross-repository sharing through techniques such as Git submodules or subtree merges prevents code duplication and simplifies version management. For more details, refer to Microsoft documentation on optimizing large Git repositories with Scalar and best practices for cross-repository code sharing.
- A. Correct.
Option 1: Correct. Scalar helps optimize Git performance for large repos by automating maintenance tasks such as git fetch, git maintenance, and background indexing. It significantly reduces delays related to large repository operations.
- B. Correct.
Option 2: Correct. Submodules (or other cross-repository techniques like subtree merges) allow teams to share and reference code across different repositories without duplicating it, easing version control and component reuse.
- C. Incorrect.
Option 3: Incorrect. Completely disabling Git garbage collection leads to a bloated repository over time, negatively impacting performance. Properly configured maintenance tasks (especially via Scalar) are essential for large repos.
- D. Incorrect.
Option 4: Incorrect. Storing large binary files directly in the repo increases clone and fetch times, especially if they are frequently updated. Large File Storage (LFS) or an external artifact repository is typically preferred for large binaries.
- E. Incorrect.
Option 5: Incorrect. Requiring each developer to maintain separate clones for each shared component creates fragmentation and complicates dependency management. Submodules or subtree merges are more efficient and maintain consistency.