Source-control hygiene
Version definitions, not private state
A repository should contain reviewed definitions and safe documentation, not authentication secrets, local caches, private datasets or production snapshots. Desktop normally generates ignore rules for .pbi/localSettings.json and .pbi/cache.abf if an ignore file does not already exist in the relevant location. Inspect and merge rules rather than replacing a team file blindly. A cached model can contain data; metadata can also contain sensitive connection or query details.
Use a conservative allowlist and review
The lab ignore example excludes PBIX, env files, private-data and key file patterns in addition to default cache/settings paths. This is a project-specific rule, not a universal Microsoft requirement. Keep actual sources and connection secrets in approved systems; use synthetic placeholders in examples. Review tracked paths, git diff --cached, and a secret scanner before merge. Ignore rules do not remove tracked files; if a secret was exposed, rotate/revoke it promptly and coordinate authorized history remediation.
Worked example 1 — check paths before commit
In the temporary repository, git check-ignore Retail.SemanticModel/.pbi/cache.abf identifies the cache as ignored. git check-ignore Retail.Report/definition.pbir returns status 1 (not ignored). Test nested settings, .env, private-data, PBIX and key paths. These are path strings only, never actual secrets or snapshots. The verifier confirms only metadata.json and .gitignore are tracked.
Worked example 2 — reject a clean-looking change
Suppose a branch has no Git conflicts but its report references Other instead of RetailModel. The checker reports report:model; reject it. A second branch has valid dependencies but changes role policy. Static references alone cannot validate RLS; compare the policy, rerun allowed and denied role queries in a native sandbox and obtain review. Do not approve merely because the file parses or Git status is clean.
Define release and rollback acceptance
Require reviewed source paths, no private data, stable identifiers, compatible PBIR/TMDL definitions, native Desktop reopen, expected query results, relationship and role checks, refresh and connection verification. Record the approved commit and preserve a secure native recovery artifact outside Git if required. Revert metadata through a reviewed change, then separately verify target bindings, data state and security. No native deployment occurs in this lab.
Practice and references
Review gitignore.example, name two false assumptions about ignored files, and list native checks that still block release. See project overview, model folder, external editing and lifecycle guidance. Next: deployment pipelines and CI/CD.