Skip to main content

Git-Aware Schemas

msh automatically creates isolated schemas for each git branch, preventing developers from overwriting each other's data.

How It Works

When you run msh run in dev environment, msh:

  1. Detects your current git branch
  2. Sanitizes the branch name (replaces /, -, . with _)
  3. Appends it to your schemas

Examples

Branch NameSchema SuffixFull Schema Name
mainmainmain_main
feature/new-apifeature_new_apimain_feature_new_api
bugfix/issue-123bugfix_issue_123main_bugfix_issue_123

Production Behavior

Production deployments (--env prod) always use standard schemas without suffixes:

  • main (not main_main)
  • msh_raw (not msh_raw_feature_new_api)

Fallback Behavior

If git is unavailable (not a git repo, git command fails), msh defaults to local suffix:

  • main_local
  • msh_raw_local