ChangelogBook a demoSign up

Configure Schema Git Sync

AudienceIT, DevOps, Data Engineering, or Analytics
Prerequisites
  • Access to a Hightouch workspace
  • A Git repository (GitHub, GitLab, etc.) for schema storage
  • Git Sync enabled in your workspace
  • Appropriate permissions for Git and Hightouch

Schema Git Sync extends Git Sync, Hightouch’s integration for version-controlling resources in Git, to include Customer Studio schema models, events, and relationships. Use it to keep schemas consistent across environments (for example, staging and production) and to version, review, and recover changes directly from your Git repository.

Overview

Schema Git Sync connects your Customer Studio schema—parent, related, and event models, plus their relationships—to a Git repository.

Whenever you update your schema in Hightouch, the changes are automatically written to YAML files in Git, and vice versa.

This gives your team all the benefits of version control for your customer data model:

  • Every schema change is captured as a Git commit.
  • You can roll back to earlier versions if needed.
  • Teams can review and approve schema updates using pull requests.
  • Environments like staging and production can stay perfectly aligned.

Think of it as turning your schema into infrastructure as code: you define your data model in Hightouch, but track, share, and deploy it safely through Git.

For authentication, repository setup, and permissions, see the main Git Sync guide →.


Setup overview

Schema Git Sync setup involves these main steps:

  1. Set up and enable Git Sync in your workspaces
  2. Create your Git repository
  3. Connect Git to each workspace
  4. Configure branches and paths
  5. Build your schema in Customer Studio
  6. Sync schema changes to Git
  7. Validate and troubleshoot syncs

For repository authentication and credential setup, see the main Git Sync guide →.


Step 1 – Set up workspaces

Git Sync is behind a feature flag.
Ask your Hightouch account team to enable it in each workspace you plan to sync.

Create or identify the Hightouch workspaces you’ll connect to Git.

Each workspace typically represents an environment (for example, staging and production).

Clone your data source into each workspace to maintain identical schemas across environments.


Step 2 – Set up your Git repository

Create a dedicated Git repository for your schema files.

Hightouch uses this repo to store YAML definitions for all models, events, and relationships.

Automatically generated repository structure:

/syncs/                # YAML files for all syncs
/models/               # YAML files for all models
/schema/               # Customer Studio schema files
  ├── event-models/    # Event model definitions
  ├── related-models/  # Related model definitions
  ├── parent-models/   # Parent model definitions
  ├── model-relationships/ # Relationship model definitions
manifest-*.yaml         # Auto-generated source/destination listings

For detailed repo setup and authentication, follow the Git Sync configuration steps.


Step 3: Connect Git to each workspace

Configure your Git repository connection from Hightouch.

  1. In Hightouch, go to Integrations → Extensions and select Version control with Git.
    Extensions page in Hightouch
  2. Under Overview, click Configure extension.
    Configure git sync modal in Hightouch
  3. Under Git credentials, click Set up and select your Git service (e.g., GitHub App).
  4. Follow the Git Sync Authentication instructions to authenticate and grant Hightouch permission to your repository.
    Set up git credentials
    Once connected, Hightouch displays your sync status and automatically detects inbound and outbound changes.
Branches do not need to exist beforehand. Hightouch creates them automatically during setup.

Step 4: Configure branches (optional)

You can use a single branch for all workspaces if their schema configurations are identical.

If any environment diverges—for example, if your staging workspace includes additional parent models or experimental relationships—you can assign each workspace a unique branch or sub-path to isolate those differences.

Example mapping (for divergent environments):

EnvironmentWorkspaceGit Branch
Staginghightouch-stagingschema-staging
Productionhightouch-productionschema-production

If all workspaces share the same schema and parent model structure, you can safely use the same branch across environments.

For more about branch and path setup, see Configure Git Sync →.


Step 5: Create your schema

Build your schema models in Customer Studio.

Define:

  • Parent models (e.g., Users table)
  • Related models (e.g., Purchases, Subscriptions)
  • Event models (e.g., Page Views, Clicks)
  • Relationships between models

Each model and relationship automatically becomes a YAML file in your Git repository under /schema/.

Example workflow:

  1. Create a Users parent model.
  2. Add a related model such as Purchases.
  3. Define a relationship between them (e.g., “Users → Purchases”).
  4. Save — Hightouch commits each definition as YAML in Git.

Follow step-by-step instructions to define your schema in Customer Studio: Define data schema →


Step 6 – Sync your schema to Git

Once Git Sync is enabled and YAML generation is turned on, Hightouch automatically performs an initial full sync of your schema. This first sync creates YAML files for your models, events, relationships, alias files, and manifest files in your Git repository.

After the initial setup, any changes you make in Customer Studio—such as creating or editing models or relationships—are automatically committed to Git within about 30 seconds.

You can monitor progress in the Runs tab of the Git Sync extension or by checking your Git commit history.

How syncing works

  • Initial sync: Runs automatically when Git Sync is first enabled.
  • Automatic updates: Every schema change in Customer Studio commits automatically to Git within about 30 seconds.
  • Two-phase commits: Hightouch commits models first, then relationships, to prevent dependency errors.You don’t need to manage this sequencing manually; Hightouch handles it automatically during both manual and automatic syncs.
  • Full resyncs: You can trigger a full resync manually if you change repository or branch settings, or to troubleshoot issues.

Large initial syncs may take 10–20 minutes depending on schema size.


Step 7 - Two-phase commit process

Schema Git Sync automatically commits schema changes in two stages to prevent dependency errors.

PhaseDescription
1 – ModelsHightouch commits model definitions first to register columns and sources.
2 – RelationshipsRelationships commit after models exist, ensuring valid references.

This process happens automatically during both manual and automatic syncs.


Validation Checklist

Before your first sync:

Feature setup

  • Git Sync feature flag is enabled for each workspace.
  • Each workspace includes an alias file (aliases-{workspace-slug}.yaml).
  • Branches or paths are unique only if environments diverge (for example, different parent models).

Schema setup

  • All workspaces use identical model slugs if they share the same schema YAMLs.
  • Source and destination slugs can differ; Hightouch manages these automatically through alias files.
  • Data sources are cloned consistently across environments.
If these prerequisites aren’t met, your sync may fail with error serializing resource.
If model slugs don’t match across workspaces, Hightouch can’t link shared schema YAMLs correctly. Alias files handle differences for sources and destinations, but not for models.

Resource slug consistency and aliases

Hightouch uses resource slugs—unique identifiers for each model, source, or destination—to link schema YAML files in Git with the corresponding resources in each workspace connected to Git Sync.

To maintain consistency across environments:

  • Model and event contract slugs must be identical across workspaces sharing the same repository.
  • Source and destination slugs can differ between environments because Hightouch automatically handles those differences through alias files.

Alias files act as a translation layer between environments. When your staging and production workspaces use different data sources or destinations, these files ensure the same schema YAMLs continue to work correctly in both.

How alias files work

Each workspace connected to Git Sync automatically gets its own alias file in your Git repository:

aliases-{workspace-slug}.yaml
You don’t need to create these files manually—Hightouch automatically generates an empty alias file if one doesn’t exist.

If your workspaces use different data sources or destinations, (for example, snowflake-dev in staging vs. snowflake-prod in production), you can edit these files to define the correct mappings for each environment.

Example structure:

sources:
  main-database: snowflake-dev
destinations:
  crm-platform: salesforce-sandbox
  • Keys (for example, main-database) are shared alias names referenced in your schema YAMLs.
  • Values (for example, snowflake-dev) are the actual resource slugs in that specific workspace.

This lets all environments share the same schema YAMLs while Hightouch automatically resolves the right connections in each workspace.

Example: staging vs. production

# aliases-staging.yaml
sources:
  main-database: snowflake-dev
destinations:
  crm-platform: salesforce-sandbox

# aliases-production.yaml
sources:
  main-database: snowflake-prod
destinations:
  crm-platform: salesforce-prod

Both workspaces use the same schema YAMLs, while each resolves to its own data sources and destinations.


Troubleshooting

If a sync fails with an error like:

error serializing resource

Meaning

Git Sync tried to serialize (save) a schema component to YAML but couldn’t find a matching resource in the workspace.

Common causes

  • Mismatched model or source slugs between environments
  • Missing or incorrect alias mappings
  • Workspace connected to the wrong Git branch
  • Schema synced before alias setup

Fix checklist

  1. Verify model and source slugs match across environments.
  2. Confirm alias files map correctly to workspace resource IDs.
  3. Ensure each workspace is using its correct Git branch.
  4. Trigger a Full resync after correcting slugs or aliases.

For more help, see the Git Sync troubleshooting guide or contact Hightouch Support.


Best practices

  • Plan workspace and branch structure before syncing.
  • Test schema changes in staging before merging to production.
  • Use pull requests to review schema changes before deployment.
  • Keep model and event contract (event schema) slugs identical across all workspaces sharing the same repository.
  • Periodically audit alias files and manifests after cloning or renaming resources.
  • Document your branch-to-workspace mapping for future maintainers.
For schema modeling guidance, see Schema Management in Customer Studio.

Ready to get started?

Jump right in or a book a demo. Your first destination is always free.

Book a demoSign upBook a demo

Need help?

Our team is relentlessly focused on your success. Don't hesitate to reach out!

Feature requests?

We'd love to hear your suggestions for integrations and other features.

Privacy PolicyTerms of Service

Last updated: Nov 4, 2025

On this page

Was this page helpful?