Lightweight, local checkpoint tool for Git worktrees, powered by Fossil.
Part of the
git-oddsuite — solving odd Git problems in odd ways.
Quickly save snapshots of your working tree files when you are not ready to commit, stash, or switch branches—and restore them completely whenever needed. Supports both the primary command git chkpt and its full alias git checkpoint.
When working with AI coding assistants, performing large refactorings, or debugging complex issues, you often need to experiment rapidly:
- Powered by Fossil: Uses the rock-solid Fossil SCM engine under the hood for fast deduplication and local snapshots, completely isolated from your Git history.
- More flexible than
git stash: Does not require a clean working tree, never conflicts with the index/staging area, and supports clear naming with a full version timeline. - Cleaner than temporary commits: Leaves no messy "wip" commits in your Git history or commit log.
- Built-in regret safety net: Every
restoreautomatically saves the current workspace state as apre-restorecheckpoint, so you can easily undo any restore operation.
cargo install git-chkptEnsure ~/.cargo/bin is in your system PATH. Cargo will automatically install both git-chkpt and git-checkpoint.
cargo install --git https://github.com/git-odd/git-chkpt.gitDownload the pre-compiled archive for your OS from the Releases page and place the binaries in your system PATH. The archive includes the storage sidecar for zero-network, fully offline usage.
Run directly inside any non-bare Git repository (git chkpt and git checkpoint are identical):
# Quick save (default command)
git chkpt
# Save with a descriptive message
git chkpt save "before parser refactor"
# Using the full alias
git checkpoint save "before parser refactor"git chkpt ls
# or: git chkpt listExample output:
ID CREATED SOURCE MESSAGE
4f18ac932e 2026-08-16 10:21:13.052 manual before parser refactor
Compare the current workspace against the latest (or specified) checkpoint:
# Compare latest checkpoint against current workspace
git chkpt diff
# Compare specific checkpoint against current workspace
git chkpt diff 4f18ac93Example output:
M src/parser.rs
A tests/parser_cases.rs
D notes/old-plan.md
Restore files to the latest or a specified checkpoint:
# Restore to the latest checkpoint
git chkpt restore
# Restore to a specific checkpoint
git chkpt restore 4f18ac93Safety Note: Before restoring,
git-chkptautomatically saves your current workspace as apre-restorecheckpoint. If you accidentally restore or change your mind, simply rungit chkpt restoreagain to return to where you were.
# Show details of the latest checkpoint
git chkpt show
# Show details of a specific checkpoint
git chkpt show 4f18ac93git chkpt rm 4f18ac93
# or: git chkpt delete 4f18ac93# 1. Take a snapshot before letting AI refactor code
git chkpt save "before AI refactor"
# 2. Run AI coding tools or write experimental changes
# ... review code, run test suite ...
# 3. Check summary of changes
git chkpt diff
# 4. If unsatisfied, roll back in one step
git chkpt restore# After restoring an older state, you realize you still need recent edits:
git chkpt ls
# Find the automatic pre-restore checkpoint and restore it:
git chkpt restore <pre-restore-id>- Included in Checkpoints:
- All Git tracked files.
- Non-ignored untracked files.
- Untouched & Preserved:
.gitinternal state (HEAD, branches, commit history, index / staging area remain intact)..gitignoreignored files and directories (build artifacts, caches, etc. are not saved and never removed on restore).- Submodules and nested Git repositories.
- Worktree Isolation:
- Each Git worktree (including linked worktrees created via
git worktree add) has completely isolated checkpoint storage.
- Each Git worktree (including linked worktrees created via
For architecture design, storage mechanisms, and formal specifications, please refer to the docs/ directory:
- Technical Notes & Architecture
- Current Implementation Specification
- Product Specification Draft
- Product Spec Coverage Matrix
- Project Status
- Naming Evaluation
Dual-licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)