Mixer Snippet and Git
The Mixer Snippet (snippets/vite-mixer.liquid by default) is the switch between a development server and Shopify production assets. Its production form references theme assets through asset_url; its development form references the local Vite server and /@vite/client. Each form carries a versioned marker. A local development origin must not enter a commit, so in a Git-backed theme, development first requires the current production form in the Git index.
Before development
Run a production build and stage the generated Mixer, layout render tag, and assets. A missing, untracked, mismatched, or unknown Mixer blocks development. For an old or unknown marker, rebuild and stage the generated snippet once instead of editing the marker by hand.
During development
With the default worktree: "skip", dev validates the indexed production form, sets skip-worktree on the Mixer, then writes the development form into the worktree. Other theme changes, even with git add -A, can still be staged without bringing the local development origin into a commit. This protection covers the plugin-owned Mixer, not every generated theme asset.
A Theme Target that is not a Git repository runs without index management (with the default devBranches, the branch check still needs a Git repository, so set devBranches: false for such a target), and worktree: "off" turns off all Git operations. In both cases the team must keep the development form out of commits and pushes by other means.
After development or an interrupted run
The development form and skip-worktree flag can intentionally survive an abnormal exit; the next development run overwrites them. A production build clears the flag and writes a visible production form. Before switching branches or handing off a clean worktree, use restore and inspect Git state. The repository Mixer Snippet and Git guide remains the exact behavioral reference.