mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
110 lines
2.6 KiB
Markdown
110 lines
2.6 KiB
Markdown
# 🎯 Git Checkpoint System - Working Demo
|
|
|
|
## ✅ System is Working!
|
|
|
|
The checkpoint system is now fully operational. Here's what just happened:
|
|
|
|
### 1. Created Files and Checkpoints
|
|
```bash
|
|
# Created demo.txt
|
|
echo "Hello World" > demo.txt
|
|
./.claude/helpers/checkpoint-hooks.sh post-edit '{"file_path": "demo.txt"}'
|
|
✅ Created checkpoint: checkpoint-20250730-201138
|
|
|
|
# Created example-file.js
|
|
# checkpoint-20250730-201233
|
|
|
|
# Modified example-file.js (added farewell function)
|
|
# checkpoint-20250730-201250
|
|
```
|
|
|
|
### 2. Current Checkpoints
|
|
```
|
|
Git Tags:
|
|
- checkpoint-20250730-201250 (latest - added farewell function)
|
|
- checkpoint-20250730-201233 (created example-file.js)
|
|
- checkpoint-20250730-201138 (created demo.txt)
|
|
```
|
|
|
|
### 3. View Changes Between Checkpoints
|
|
```bash
|
|
# See what changed since creating example-file.js
|
|
./.claude/helpers/checkpoint-manager.sh diff checkpoint-20250730-201233
|
|
|
|
# Shows: Added farewell function
|
|
```
|
|
|
|
### 4. Rollback Examples
|
|
|
|
#### Safe Rollback (Create Branch)
|
|
```bash
|
|
# Create a new branch from checkpoint
|
|
./.claude/helpers/checkpoint-manager.sh rollback checkpoint-20250730-201233 --branch
|
|
```
|
|
|
|
#### File-Specific Rollback
|
|
```bash
|
|
# Restore just one file from checkpoint
|
|
git checkout checkpoint-20250730-201233 -- example-file.js
|
|
```
|
|
|
|
#### Hard Reset (Careful!)
|
|
```bash
|
|
# Reset entire repo to checkpoint (destructive)
|
|
./.claude/helpers/checkpoint-manager.sh rollback checkpoint-20250730-201233 --reset
|
|
```
|
|
|
|
## 🚀 Using with Claude Code
|
|
|
|
### Option 1: Simple Configuration
|
|
```bash
|
|
# Copy simple settings
|
|
cp .claude/settings-checkpoint-simple.json .claude/settings.json
|
|
```
|
|
|
|
### Option 2: Advanced Configuration
|
|
```bash
|
|
# Use setup script
|
|
./.claude/helpers/setup-checkpoints.sh
|
|
# Choose option 1 or 2
|
|
```
|
|
|
|
## 📋 Quick Reference
|
|
|
|
### Create Manual Checkpoint
|
|
```bash
|
|
# For any file
|
|
./.claude/helpers/checkpoint-hooks.sh post-edit '{"file_path": "path/to/file"}'
|
|
|
|
# For task start
|
|
./.claude/helpers/checkpoint-hooks.sh task "Description of task"
|
|
|
|
# For session end
|
|
./.claude/helpers/checkpoint-hooks.sh session-end
|
|
```
|
|
|
|
### List & Manage
|
|
```bash
|
|
# List all checkpoints
|
|
./.claude/helpers/checkpoint-manager.sh list
|
|
|
|
# Show specific checkpoint
|
|
./.claude/helpers/checkpoint-manager.sh show checkpoint-YYYYMMDD-HHMMSS
|
|
|
|
# Compare with checkpoint
|
|
./.claude/helpers/checkpoint-manager.sh diff checkpoint-YYYYMMDD-HHMMSS
|
|
|
|
# Clean old checkpoints
|
|
./.claude/helpers/checkpoint-manager.sh clean 7 # older than 7 days
|
|
```
|
|
|
|
## 🎉 Success!
|
|
|
|
The checkpoint system is now:
|
|
- ✅ Creating tags correctly
|
|
- ✅ Storing metadata
|
|
- ✅ Tracking changes
|
|
- ✅ Providing rollback options
|
|
- ✅ Ready for Claude Code integration
|
|
|
|
Start using it to never lose work again! |