AGCL (AVC Git Compatibility Layer) enables seamless integration between AVC and Git, allowing you to push AVC repositories directly to GitHub, GitLab, and other Git hosting services.
AGCL converts between two formats:
- AVC Format: BLAKE3 hashes (64-char) + zstd compression
- Git Format: SHA-1 hashes (40-char) + zlib compression
# Initialize AVC repository
avc init
# Initialize Git repository alongside AVC
avc agcl git-init# Add files incrementally
avc add file1.txt
avc add file2.txt
# Or add all files
avc add .
# Commit changes
avc commit -m "Your commit message"
# Check status
avc status# Convert AVC objects to Git format
avc agcl sync-to-git
# Verify conversion (optional)
avc agcl verify-git# Add remote repository
git remote add origin https://github.com/username/repo.git
# Push to GitHub
git push -u origin mainInitializes a Git repository alongside your AVC repository.
What it creates:
.git/directory structure.git/HEADpointing torefs/heads/main.git/configwith proper Git configuration.git/objects/for Git objects.git/refs/for Git references
Converts AVC objects (commits, trees, blobs) to Git format.
Conversion process:
- Commits: Converts BLAKE3 commit hashes to SHA-1
- Trees: Converts directory structures with proper Git tree format
- Blobs: Converts file contents with SHA-1 hashing
- References: Updates
.git/refs/heads/mainwith latest commit
Hash mapping:
- Maintains a mapping file (
.git/avc-map) between AVC and Git hashes - Ensures consistent conversion across multiple syncs
Verifies that the Git repository is in a valid state.
Checks performed:
- Git objects exist and are accessible
- Commit references are valid
- Repository structure is complete
- Objects pass
git fsckvalidation
Cause: Commit message parsing failed Solution: Ensure commit messages are properly formatted
Cause: Working directory and Git index are out of sync Solution: This is normal after AGCL sync - the Git repository contains the objects but working directory shows AVC files
Cause: Invalid Git objects or empty repository Solution:
- Run
avc agcl verify-git - Check
git log --onelineshows commits - Ensure commit messages are not empty
Cause: Native optimizations not supported Solution: Use portable build:
cmake -DAVC_PORTABLE_BUILD=ON ..# Work normally with AVC
avc add file1.txt
avc commit -m "Add file1"
avc add file2.txt
avc commit -m "Add file2"
# Sync all commits at once
avc agcl sync-to-git
# Push entire history
git push origin mainAGCL is designed to handle incremental syncs efficiently:
- Only new commits are converted
- Existing Git objects are reused
- Hash mapping prevents duplicate work
# Clean up AVC repository
avc clean
# Remove Git repository
rm -rf .git
# Start fresh
avc agcl git-init- AVC → Git: BLAKE3 (64-char) converted to SHA-1 (40-char)
- Mapping: Stored in
.git/avc-mapfor consistency - Collision Handling: Uses cryptographic hashing to prevent conflicts
- Blobs: Direct content conversion with new hash
- Trees: Binary format conversion with proper Git tree structure
- Commits: Header parsing and timestamp conversion
- AVC: zstd compression
- Git: zlib compression
- Automatic: AGCL handles compression format differences
- Always verify: Run
avc agcl verify-gitbefore pushing - Incremental workflow: Add files individually for better tracking
- Meaningful commits: Use descriptive commit messages
- Regular sync: Sync to Git format regularly to catch issues early
- Backup important work: AGCL is stable but backup critical repositories
- One-way sync: Currently only AVC → Git (Git → AVC planned)
- Hash mapping: Requires mapping file for consistency
- Performance: Large repositories may take time to convert initially
- Git features: Some advanced Git features not supported in reverse direction
# Setup
avc init
avc agcl git-init
# Work
echo "Hello World" > hello.txt
avc add hello.txt
avc commit -m "Initial commit"
# Publish
avc agcl sync-to-git
git remote add origin https://github.com/user/project.git
git push -u origin main# Setup
avc init
avc agcl git-init
# Add files incrementally
avc add README.md
avc add src/main.c
avc add Makefile.legacy
avc commit -m "Add project files"
# More changes
avc add tests/test.c
avc commit -m "Add tests"
# Publish all
avc agcl sync-to-git
git push origin mainAGCL makes AVC the first version control system with native GitHub compatibility while maintaining the performance benefits of BLAKE3 and zstd compression.