1
0
Fork 0
mirror of https://github.com/imjasonh/cnotes synced 2026-07-18 14:47:18 +00:00

Complete git notes preservation documentation and cleanup

- Added comprehensive documentation for notes preservation during rebasing/squashing
- Updated CLAUDE.md with backup/restore command examples
- Documented best practices for preserving conversation context during destructive git operations
- Cleaned up test files

All git notes preservation features are now complete and documented.
This commit is contained in:
Jason Hall 2025-07-21 12:40:04 -04:00
parent 7b6cdffa8a
commit 5d9e678db8
Failed to extract signature
4 changed files with 56 additions and 74 deletions

View file

@ -58,6 +58,7 @@ This is a Claude Code hooks system that intercepts and processes all tool usage
**`cmd/`** - CLI interface using Cobra
- `run.go` - Handles hook execution (called by Claude Code)
- `install.go` - Manages hook installation/uninstallation
- `notes.go` - Git notes backup, restore, and management commands
### Type Safety and JSON Handling
@ -138,6 +139,20 @@ git log --show-notes=claude-conversations --oneline
- Commit context (command and git output)
- Claude version information
**Notes Preservation**:
```bash
# Backup all conversation notes
./hooks notes backup [filename]
# List all commits with notes
./hooks notes list
# Restore from backup after destructive operations
./hooks notes restore <filename>
```
The system automatically warns before destructive git operations and configures git to preserve notes during rewrites.
## Key Design Principles
- **No Type Casting**: All JSON handling uses proper unmarshaling to typed structs