Git AST provides language-aware extensions for Git, leveraging Abstract Syntax Trees (ASTs) instead of traditional line-based diffs. This enhances Git with semantic understanding, leading to more meaningful history, easier merges, and enhanced code consistency.
Why use Git AST?
- Cleaner Diffs: Focus on meaningful code changes, ignore formatting noise
- Smarter Merges: Reduce conflicts caused by code movement or non-competing structural edits
- Consistent Formatting: Enforce a canonical code style automatically across your repository
Git AST leverages Git's clean and smudge filters to operate on the structure of your code:
- When You Commit: Source code is parsed into a syntax tree (AST/CST) and stored in Git
- When You Check Out: The stored tree is converted back into consistently formatted source code
This structural approach lets you focus on semantic changes rather than textual differences.
- Installation Guide - Set up Git AST in your environment
- Usage Guide - Learn how to use Git AST in your workflow
- Documentation - Comprehensive documentation
- Project Overview - Goal, mechanism, and key concepts
- Roadmap - Project development timeline
- Architecture Design - Technical architecture and data flow
- Clean/Smudge Filters - Details on the Git filter implementation
- Key Concepts - Detailed explanation of core concepts
- Glossary - Definition of terms
- FAQ - Frequently asked questions
- Contribution Guidelines - How to contribute
- Development Setup - Setting up your development environment
For a full documentation overview, see Documentation Index.
Current Phase: Proof of Concept (POC) refinement
This project is under active development. The current focus is on refining the architecture to use Git's clean/smudge filters for seamless integration, leveraging Tree-sitter to parse source files into structured representations.
This project is licensed under the MIT License. See the LICENSE file for details.
We welcome contributions! Please see our contribution guidelines for how to get involved.