Interview Prep/GitOps & Argo CD/Adopting GitOps & Repo Design

A team wants a Git branch per environment (`dev`, `staging`, `prod`). How do you respond?

IntermediateScenarioAdopting GitOps & Repo Design
Answer

Situation read → Branch-per-environment feels natural but causes drift between branches.

What I'd do →

  1. Explain the problems: merge conflicts, environment-specific commits leaking on merge, cherry-picks, and no side-by-side view of differences.
  2. Propose folders on main: envs/dev, envs/staging, envs/prod with Kustomize overlays or Helm value files.
  3. Promotion becomes a PR that changes one value in the next folder, protected by CODEOWNERS.
  4. Point every Application at main with a different path.

Why → Folders make differences explicit and reviewable; branches hide them in history.

Interview tip → Mention git diff envs/staging envs/prod as the killer demo for folders.

All GitOps & Argo CD questions Roadmap: Argo CD (GitOps)

More on Adopting GitOps & Repo Design