Skip to content
Latchkey

How to Choose Between Git and Cloud Baseline Storage for Visual Tests

Git baselines are simple and versioned with code but bloat the repo, while cloud baselines keep the repo lean at the cost of an external service and token.

Decide by repo size and workflow: small suites suit committed PNGs, large suites suit a cloud store (Percy, Chromatic, reg-suit + S3) that keys baselines per branch.

Trade-offs

ConcernGit baselinesCloud baselines
SetupNone, just commit PNGsToken and service integration
Repo sizeGrows with every snapshotStays small
ReviewDiff in the PR (binary)Dedicated review UI
Branch baselinesWhatever is on the branchKeyed per base commit

Keep git baselines lean

Terminal
# Track large PNGs with Git LFS to avoid bloating history
git lfs track "tests/**/*.png"
git add .gitattributes && git commit -m "Track snapshots with LFS"

Gotchas

  • Binary PNG diffs are unreadable in a PR; a cloud UI shows side-by-side comparisons.
  • Git LFS reduces clone size but adds a bandwidth quota to manage.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →