Skip to main content

atmos git diff

Show uncommitted changes in a repository configured under git.repositories, or in any local path. This is the read-before-write step of GitOps publishing — the GitOps analog of terraform plan: see exactly what would be committed to a deployment repository without committing anything.

atmos git diff --help

Usage

atmos git diff <name-or-path> [flags]

With a configured deployment repository:

git:
repositories:
flux-deploy:
uri: https://github.com/acme/flux-deploy.git
atmos git diff flux-deploy --path=clusters/prod

The unified diff is written to stdout (pipeable). Untracked files are reported separately on stderr so they don't corrupt piped diff output.

Examples

# Show all uncommitted changes in a managed repository
atmos git diff flux-deploy

# Scope the diff to specific repo-relative paths
atmos git diff flux-deploy --path=clusters/prod --path=clusters/staging

# Diff a repository at a local path
atmos git diff ./deployments

# Pull-request preview in CI: render manifests, then show what would change
atmos git diff flux-deploy --path=clusters/prod > preview.diff

Arguments

name-or-path (required)

A repository name configured under git.repositories, or a filesystem path to an existing Git working tree. URIs are not accepted — diff operates on a local workdir.

Flags

--path (optional)

Limit the diff to these repo-relative paths. Repeatable (--path=a --path=b) or comma-separated (--path=a,b). Environment variable: ATMOS_GIT_DIFF_PATH

--identity (optional)

Atmos Auth identity to use for this operation (global flag). Overrides the repository's auth.identity. Environment variable: ATMOS_IDENTITY