🔄 Zero-config, language-agnostic Git snapshots via tags.
npm install -g git-checkpointspip install git-checkpointscurl -LsSf https://raw.githubusercontent.com/moussa-m/git-checkpoints/main/install.sh | bashBoth methods:
- Install
git-checkpointsinto yourPATH - Add
git checkpoint/git checkpointsaliases in this repo - Schedule auto-snapshot every 5 minutes when changes exist (configurable)
git-checkpoints uninstallRemoves the global CLI and all cron entries.
git checkpoint [name] # create a checkpoint
git checkpoints list # list all checkpoints
git checkpoints delete * # delete one or all
git checkpoints load <name># restore a checkpointgit-checkpoints create [name]
git-checkpoints list
git-checkpoints delete <name|*>
git-checkpoints load <name>
git-checkpoints auto
git-checkpoints pause # pause auto-checkpointing
git-checkpoints resume # resume auto-checkpointing
git-checkpoints config <get|set> # manage configuration
git-checkpoints local-uninstall
git-checkpoints uninstallControl auto-checkpointing behavior with the config command:
git-checkpoints config get # show all settings
git-checkpoints config get interval # show current interval
git-checkpoints config get status # show current status
git-checkpoints config set interval 10 # set interval to 10 minutesAvailable options:
interval- Auto-checkpoint interval in minutes (default: 5)status- Current status:pausedorrunning
Examples:
# Set checkpoints every 15 minutes
git-checkpoints config set interval 15
git-checkpoints resume # apply new interval
# Check current configuration
git-checkpoints config get
# Output:
# ℹ️ Current configuration:
# interval: 15 minutes
# status: runningThis project includes a comprehensive test suite that runs automatically on GitHub Actions.
# Run all tests
cd tests
./run_all_tests.sh
# Run specific test categories
./unit_tests.sh # Unit tests
./integration_test.sh # GitHub integration tests
./test_scenarios/basic_workflow_test.sh # Workflow tests
./test_scenarios/cron_auto_checkpoint_test.sh # Cron job tests
./test_scenarios/cron_seconds_test.sh # 10-second interval tests
# Clean up test artifacts
./cleanup_all_tests.sh- Unit Tests: Individual function testing
- Integration Tests: Real GitHub repository creation and management
- Workflow Tests: Typical development scenarios
- Cron Tests: Automatic checkpoint functionality with various intervals
- Installation Tests: Complete installation process verification
The project uses GitHub Actions for continuous integration:
- Full Test Suite: Runs on push to main branch
- PR Quick Check: Fast tests for pull requests
- Seconds Interval Test: Extended testing with 10-second intervals (triggered by
test-secondslabel)
- Git
- GitHub CLI (
gh) with authentication - Bash 4.0+
- crontab (optional, for cron tests)
-
git-checkpointsnot found? Ensure your install dir (e.g.~/.local/bin) is in$PATH. -
No snapshots?
- Check uncommitted changes:
git status - Trigger one manually:
git checkpoint
- Check uncommitted changes:
-
Cron not running?
- Verify service:
systemctl status cron - Check crontab:
crontab -l | grep git-checkpoints
- Verify service:
Enjoy effortless, zero-config backups of your work-in-progress!