Git History Migration
Ivaldi can now import full commit history from GitHub and GitLab repositories, preserving all commits, authors, timestamps, and tags. This allows you to travel through the complete history of a repository using Ivaldi’s time-travel features.
Overview
When downloading a repository from GitHub or GitLab, Ivaldi can:
- Import the entire commit history or a limited depth
- Preserve author and committer information
- Maintain original commit timestamps
- Import tags and releases
- Build the complete parent-child commit chain
Usage
Basic Download with Full History
ivaldi download owner/repo
By default, Ivaldi imports the full commit history from the repository.
Limit Commit Depth
To import only the most recent commits:
ivaldi download owner/repo --depth=100
This imports the 100 most recent commits. Use --depth=0 for full history (default).
Skip History Migration
For backward compatibility or when you only need the latest snapshot:
ivaldi download owner/repo --skip-history
This downloads only the latest files without any commit history.
Include Tags and Releases
To import tags along with commit history:
ivaldi download owner/repo --include-tags
Tags are created as Ivaldi timeline references under tags/ namespace.
Examples
Clone Repository with Full History
ivaldi download torvalds/linux
Output:
Cloning torvalds/linux from GitHub...
Repository: torvalds/linux
Description: Linux kernel source tree
Default branch: master
Fetching commit history (depth: full history)...
Found 1234567 commits to import
Importing commit 1/1234567: abc1234 (Initial commit)
Importing commit 2/1234567: def5678 (Add feature X)
...
Successfully cloned torvalds/linux with 1234567 commits
Clone with Limited Depth
ivaldi download facebook/react --depth=50
Output:
Cloning facebook/react from GitHub...
Repository: facebook/react
Default branch: main
Fetching commit history (depth: 50 commits)...
Found 50 commits to import
Importing commit 1/50: abc1234 (Fix bug in hooks)
...
Successfully cloned facebook/react with 50 commits
Clone with Tags
ivaldi download golang/go --include-tags
Output:
Cloning golang/go from GitHub...
...
Successfully cloned golang/go with 125432 commits
Importing tags and releases...
Found 342 tags
Imported tag: go1.21.0
Imported tag: go1.20.5
...
Successfully imported 342/342 tags
GitLab Repository with History
ivaldi download gitlab-org/gitlab --gitlab --depth=100 --include-tags
How It Works
Commit Import Process
- Fetch Commit List: Ivaldi queries the GitHub/GitLab API for commit history
- Chronological Order: Commits are imported oldest-first to maintain proper parent relationships
- Download Files: For each commit, Ivaldi downloads the file tree at that point in time
- Create Ivaldi Commit: Each Git commit is converted to an Ivaldi commit with:
- Preserved author and committer metadata
- Original commit timestamps
- Original commit message
- Parent commit references
- Store Mappings: Git SHA-1 hashes are mapped to Ivaldi BLAKE3 hashes for traceability
- Update Timeline: The timeline HEAD points to the latest commit
Tag Import
When --include-tags is enabled:
- Fetch all tags from the repository
- For each tag, find the corresponding Ivaldi commit
- Create an Ivaldi timeline reference under
tags/namespace - Tags without corresponding commits are skipped with a warning
Command Options
download Command Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--depth |
int | 0 | Limit commit history depth (0 for full history) |
--skip-history |
bool | false | Skip history migration, download only latest snapshot |
--include-tags |
bool | false | Import tags and releases as Ivaldi references |
--recurse-submodules |
bool | true | Automatically clone and convert Git submodules |
Platform-Specific Flags
GitLab
| Flag | Description |
|——|————-|
| --gitlab | Force GitLab platform detection |
| --url | Custom GitLab instance URL |
Viewing Imported History
After importing history, you can use Ivaldi’s log command to view commits:
ivaldi log
Output:
seal: brave-mountain-7a3c (7a3c4ef1)
message: Fix critical bug in authentication
author: Jane Doe <jane@example.com>
date: 2025-11-14 10:30:15
seal: silent-river-2b1d (2b1d9af3)
message: Add new user dashboard feature
author: John Smith <john@example.com>
date: 2025-11-13 14:22:08
...
Traveling Through History
With full commit history imported, you can use Ivaldi’s time-travel features:
Jump to Specific Commit
ivaldi jump <seal-name>
View Differences Between Commits
ivaldi log --verbose
Timeline Management
# List all timelines (including tags)
ivaldi timeline list
# Create new timeline from tag
ivaldi timeline create my-feature --from tags/v1.0.0
# Switch to a tag
ivaldi timeline switch tags/v1.0.0
Performance Considerations
Large Repositories
For repositories with extensive history:
- Use depth limiting:
--depth=100for recent commits only - Increased timeout: Large imports may take 10-30 minutes
- Network bandwidth: Full history requires downloading all file versions
- Storage space: Each commit’s files are stored (with deduplication)
Optimization Tips
- Start with shallow clone: Use
--depth=50initially, then fetch more history if needed - Skip history for archives: Use
--skip-historyfor read-only reference repositories - Incremental imports: Import recent history first, older history can be added later
- Use tags strategically: Only import tags if you need to reference specific releases
Storage and Deduplication
Ivaldi’s content-addressable storage (CAS) automatically deduplicates:
- Files that don’t change between commits
- Identical content across different paths
- Content shared across timelines
This means importing full history is more storage-efficient than it might appear.
Git Mapping
Ivaldi maintains a mapping between Git SHA-1 hashes and Ivaldi BLAKE3 hashes:
Git SHA-1: abc123def456... → Ivaldi BLAKE3: 7a3c4ef1...
This mapping enables:
- Traceability back to original Git commits
- Incremental synchronization with remote
- Compatibility with Git-based workflows
Troubleshooting
Import Fails Midway
If import fails partway through:
Error: failed to import commit abc1234: network timeout
Solution: Re-run the download command. Ivaldi will skip already-imported commits and continue from where it left off.
Tag Import Warnings
Warning: tag 'v1.0.0-beta' points to commit abc1234 which was not imported, skipping
Cause: The tag points to a commit outside the imported range (when using --depth).
Solution: Import with greater depth or use --depth=0 for full history.
Rate Limiting
GitHub API has rate limits:
- Unauthenticated: 60 requests/hour
- Authenticated: 5000 requests/hour
Solution: Run ivaldi auth login to authenticate and increase rate limits.
Best Practices
- Authentication First: Always authenticate before importing large repositories
ivaldi auth login -
Start Shallow: Begin with
--depth=100, expand if needed -
Use Tags Selectively: Only use
--include-tagsif you need release references -
Check Disk Space: Large histories require significant storage
- Incremental Approach:
- First import:
--depth=100 - Later: Fetch full history if needed
- First import:
- Documentation Repositories: Use
--skip-historyfor static documentation
Comparison with Git Clone
| Feature | Ivaldi | Git |
|---|---|---|
| Hashing | BLAKE3 | SHA-1 |
| Storage | CAS with deduplication | Packfiles |
| History | Optional depth control | Supports shallow clones |
| Metadata | Preserved | Preserved |
| Tags | Optional import | Always imported |
| Submodules | Auto-converted to Ivaldi | Requires –recurse-submodules |
See Also
- Getting Started - Basic Ivaldi workflow
- Sync Command - Incremental updates
- Core Concepts - Understanding timelines and seals
- Architecture - How Ivaldi stores data