Enterprise Deployment - Git Hooks
Deploy Git AI using core.hooksPath configuration without wrapping git. Advanced enterprise deployment for organizations that prefer hook-based integration.
An alternative to the git wrapper approach is to deploy Git AI using Git's core.hooksPath
configuration. This method doesn't require wrapping the git binary but is more complex to set up correctly.
Overview
Git version 2.35 (released in 2022) introduced support for configuring git hooks in a central location across all repositories on a machine. This allows you to deploy Git AI hooks globally without modifying individual repositories.
Important: core.hooksPath
overrides rather than extends repo-specific hooks. Each Git AI hook must be configured to invoke both:
- The Git AI-specific logic
- Any hooks in the repository's
.git/hooks
folder
This ensures that repository-specific hooks (like linters, formatters, or CI triggers) continue to work alongside Git AI.
Required Hooks
The following hooks must be implemented for Git AI to function correctly:
pre-commit
post-commit
pre-push
post-checkout
post-rewrite
pre-rebase
post-rebase
post-reset
Get Help with This Deployment Method
This approach is more complex than the git wrapper method. We're still working on public documentation for hook implementation, best practices for hook chaining, and example scripts.
If you're interested in rolling out Git AI without proxying git on developer machines, schedule a call with one of the maintainers and we'll help you get started.
Advantages and Disadvantages
Advantages
- No git wrapper required
- Direct git binary execution
- Potentially simpler for some MDM deployments
Disadvantages
- More complex setup and maintenance
- Must handle hook chaining correctly
- Requires careful coordination with repository hooks
- More difficult to troubleshoot
Recommended Approach
For most organizations, we recommend the git wrapper deployment method as it's simpler, more reliable, and easier to maintain.
Enterprise Deployment - Git Wrapper
Deploy Git AI as a Git wrapper across your organization using MDM or custom install scripts. Recommended enterprise deployment method for tracking AI code at scale.
Performance FAQs
Git AI's performance characteristics and impact on git operations. Learn about overhead, scaling, and benchmarks for enterprise deployments.