Skip to main content

Share a Graph with Your Team using vg share

Use vg share to make the code map committable and auto-updating. It installs a pre-commit hook, a deterministic merge driver, and .gitignore entries so the graph stays fresh in version control.

Vibgrate Docs

Vibgrate Help

A code map is most valuable when the whole team shares it. vg share makes the Vibgrate Graph code map committable and auto-updating, so it lives in your repository and stays in sync as people push changes. This article explains what it sets up and how to adopt it.

Overview

By default the code map is a local artifact. vg share turns it into a team asset by installing three things: a pre-commit hook that keeps the committed map current, a deterministic merge driver so the graph merges cleanly instead of conflicting, and .gitignore entries that track the right files and ignore the rest. The result is a code map your teammates get automatically when they pull.

Prerequisites

Work inside a Git repository with a built code map:

vg build

Enable sharing

vg share

This installs the hook, the merge driver, and the .gitignore rules. From then on, committing changes keeps the map fresh automatically, and merges between branches resolve the graph deterministically rather than producing noisy conflicts.

Why a deterministic merge driver matters

Graph artifacts can change in many places at once, which would normally cause frequent merge conflicts. The deterministic merge driver produces the same result regardless of merge order, so parallel work on different branches reconciles cleanly. This is what makes committing the map practical at team scale.

Keeping it healthy

After enabling sharing, use vg status to confirm the committed graph matches the working tree:

vg status

If the graph is stale, rebuild it and commit — the pre-commit hook is designed to keep this in check automatically.

Related

  • Build the map with vg build.
  • Check freshness with vg status.
  • Read sharing a graph with a team for adoption tips.

Sharing keeps the map in your own repository; Vibgrate does not upload it as part of vg share.