Make the Code Graph Committable for Your Team with vg share
vg share makes the code map committable and auto-updating by installing a pre-commit hook, a deterministic merge driver, and .gitignore — so the whole team shares one current graph.
A code graph is most valuable when the whole team shares one that stays current. vg share makes the code map committable and auto-updating by installing a pre-commit hook, a deterministic merge driver, and the right .gitignore entries.
Prerequisites
- A built code graph from
vg build - A git repository
Steps
1. Build the graph
vg build
2. Run share
vg share
vg share configures your repository so the graph travels with the code.
3. Understand the pre-commit hook
The installed pre-commit hook keeps the committed graph auto-updating: when you commit code changes, the graph is refreshed so teammates always pull a current map.
4. Understand the merge driver
Graph artifacts can otherwise conflict on every merge. The deterministic merge driver resolves graph merges cleanly, so branches combine without manual graph conflicts.
5. Verify freshness
Confirm the committed graph matches the working tree:
vg status
vg status compares the committed graph against your current code and reports staleness.
Verification
Make a small code change and commit it; confirm the graph updates via the hook. Run vg status and confirm the committed graph is in sync with your working tree.
Next Steps
- Check freshness anytime with
vg status - Keep the graph current with
vg build - Serve it to assistants with
vg serve