Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

Apply version control best practices using Git

A worked example

Complete the statement

Contoso stores code for every team in one Azure DevOps monorepo, which contains about 48,000 tracked assets (notebooks and files). The data engineering team needs only the pipelines/ and shared_libs/ directories, which together contain about 12,000 assets. Each data engineer will create their own Azure Databricks Git folder for this repository.

Requirements:

  • Each engineer's Git folder must follow the Databricks recommendation for the total number of assets.
  • No files may be deleted or moved in the repository, on any branch, because other teams depend on them.
  • Other teams' files must remain tracked in the repository.

Complete the guidance for the data engineering team.

Databricks recommends keeping the total number of assets in a Git folder below . To follow this recommendation and meet the other requirements, each engineer should use in their Git folder.

  • Blank 1: 20,000 (correct answer)

    Correct: Databricks recommends keeping the total number of assets in a Git folder below 20,000. The full repository (about 48,000) exceeds this, and the two directories (about 12,000) are within it. 10,000: not the recommended figure; with this value, even the two directories alone would exceed it. 50,000 and 100,000: not the recommended figure; with either value, the full repository would comply and no action would be needed.

  • Blank 2: sparse checkout limited to the pipelines and shared_libs directories (correct answer)

    Correct: for large repositories, sparse checkout lets an engineer work with only the directories they need. It brings the Git folder to about 12,000 assets without deleting files or changing what the repository tracks. .gitignore entry: the other teams' files are already tracked, so .gitignore does not apply to them until they are explicitly removed from tracking, and that removal would conflict with keeping them tracked. Full checkout of the entire monorepo: the Git folder would contain about 48,000 assets, above the recommended count. Personal branch that deletes directories: this breaks the rule that no files may be deleted on any branch.

Why

Databricks recommends fewer than 20,000 assets in a Git folder. A full clone of this 48,000-asset monorepo would exceed that, while the two directories the team needs (about 12,000 assets) would not. Sparse checkout limits the Git folder to the directories an engineer needs, so it meets the recommendation without deleting files or changing which files the repository tracks. A .gitignore entry cannot exclude files that are already tracked. A branch that deletes directories breaks the no-deletion rule.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free