This folder contains the comprehensive enterprise-grade Git safety system that was created on January 20, 2026.
This system includes:
- Multiple Git hooks for protection
- Automated backup scripts
- GitHub Actions workflows
- Extensive documentation and guides
- Visual diagrams and cheat sheets
This was initially created in response to concerns about AI coding tools (like Claude Code) accidentally deleting projects. However, it turned out to be over-engineered for a solo developer's needs.
The project already had a good GIT_WORKFLOW.md guide, and a simpler interactive commit script was created instead.
In the main project root, you'll find:
commit.sh- Interactive commit script (asks before doing anything)GIT_WORKFLOW.md- Updated with automation instructions- Simple, manual workflow that fits a solo developer
All the documentation here is solid and can be used to:
- Teach Git safety to teams
- Share with other developers concerned about AI tool safety
- Implement in larger/team projects
- Learn advanced Git workflows
- START_HERE.md - Good overview of the system
- PROJECT_SAFETY_GUIDE.md - Comprehensive safety practices
- QUICK_REFERENCE.md - Emergency recovery commands
- SAFETY_SYSTEM_OVERVIEW.md - Visual diagrams and flows
- CHEAT_SHEET.txt - Printable reference card
- pre-commit - Hook that blocks mass deletions
- pre-push - Hook that creates backups before push
- backup-project.sh - Comprehensive backup script
- commit-msg - Hook that shows commit summaries
If you want to use this full system on another project:
-
Copy the hooks to
.git/hooks/:cp pre-commit pre-push commit-msg /path/to/project/.git/hooks/ chmod +x /path/to/project/.git/hooks/* -
Copy the backup script:
cp backup-project.sh /path/to/project/ chmod +x /path/to/project/backup-project.sh
-
Copy the documentation you want:
cp QUICK_REFERENCE.md SETUP_COMPLETE.md /path/to/project/
-
Copy GitHub Actions workflow:
mkdir -p /path/to/project/.github/workflows cp ../../../.github/workflows/backup.yml /path/to/project/.github/workflows/
- Pre-commit Hook - Blocks commits that delete >50% of files
- Pre-push Hook - Creates backup bundle before every push
- Commit-msg Hook - Shows change summary
- Backup Script - Creates comprehensive backups on demand
- GitHub Actions - Daily automated cloud backups
- Branch Protection - GitHub-level safety (setup guide included)
Getting Started:
- START_HERE.md
- SETUP_COMPLETE.md
- INSTALLATION_SUMMARY.md
Daily Use:
- QUICK_REFERENCE.md
- CHEAT_SHEET.txt
- SIMPLE_VERSION.md
Learning:
- PROJECT_SAFETY_GUIDE.md
- SAFETY_SYSTEM_OVERVIEW.md
- INDEX.md
Configuration:
- GITHUB_PROTECTION_SETUP.md
- README_SAFETY_ADDITION.md
The original request was about preventing project deletion by AI tools. The system created was enterprise-grade with:
- 10+ documentation files
- 6 layers of protection
- Extensive guides and diagrams
- Team-focused features
For a solo developer, this was overkill. The simple commit.sh script provides adequate protection with a better UX.
However, this comprehensive system is valuable for:
- Teams
- Larger projects
- Educational purposes
- Sharing with other developers
Created by Claude (Anthropic) on January 20, 2026 for the SWR Scenarios project.
Licensed under the same terms as the main project.
Note: If you're looking at this and thinking "this is way too much," you're right! See the main project's commit.sh and GIT_WORKFLOW.md for the simpler approach that was adopted instead.