Skip to main content
Glama
README.mdβ€’8.54 kB
# πŸ›‘οΈ Repository Protection Documentation **Complete guide to keeping your notepadpp-mcp repository safe** --- ## πŸ“š **Documentation Index** ### **Quick Start** 1. [Branch Protection Settings](BRANCH_PROTECTION_SETTINGS.md) - **START HERE** (5 minutes setup) 2. [Branch Strategy & AI Workflow](BRANCH_STRATEGY_AND_AI_WORKFLOW.md) - How to collaborate with AI safely 3. [Backup & Recovery Guide](BACKUP_AND_RECOVERY_GUIDE.md) - Multiple layers of protection --- ## 🎯 **What's In This Directory** ### **1. Branch Protection Settings** πŸ“„ `BRANCH_PROTECTION_SETTINGS.md` **Quick reference for setting up GitHub branch protection** **What it covers**: - βœ… Step-by-step GitHub settings - βœ… Exact checkboxes to enable - βœ… Visual setup checklist - βœ… Verification tests **Time to complete**: 5 minutes **Difficulty**: Easy **Priority**: **HIGH** - Do this first! --- ### **2. Branch Strategy & AI Workflow** πŸ“„ `BRANCH_STRATEGY_AND_AI_WORKFLOW.md` **Complete guide to safe AI collaboration** **What it covers**: - βœ… Three-branch strategy (main/develop/experimental) - βœ… AI playground on feature/experimental - βœ… PR workflow for production - βœ… Examples of AI prompts for each branch - βœ… Cherry-picking experimental features - βœ… Keeping branches synchronized **Key benefit**: AI can experiment wildly without risking production code! --- ### **3. Backup & Recovery Guide** πŸ“„ `BACKUP_AND_RECOVERY_GUIDE.md` **Multi-layer protection strategy** **What it covers**: - βœ… 5 layers of protection - βœ… Automated backup script - βœ… Git reflog (90-day time machine) - βœ… Recovery scenarios - βœ… Emergency procedures - βœ… Windows Task Scheduler setup **Key benefit**: Almost impossible to permanently lose code! --- ## πŸš€ **Quick Setup (15 Minutes)** ### **Step 1: Enable Branch Protection (5 min)** Follow: [BRANCH_PROTECTION_SETTINGS.md](BRANCH_PROTECTION_SETTINGS.md) 1. Go to GitHub repository settings 2. Add protection rule for `main` branch 3. Enable required PR reviews 4. Disable force pushes and deletions **Result**: Main branch is bulletproof! βœ… --- ### **Step 2: Understand Branch Strategy (5 min)** Read: [BRANCH_STRATEGY_AND_AI_WORKFLOW.md](BRANCH_STRATEGY_AND_AI_WORKFLOW.md) **Learn**: - When to use `main` (production) - When to use `develop` (testing) - When to use `feature/experimental` (AI playground) **Result**: Clear workflow for AI collaboration! βœ… --- ### **Step 3: Set Up Automated Backups (5 min)** Follow: [BACKUP_AND_RECOVERY_GUIDE.md](BACKUP_AND_RECOVERY_GUIDE.md) 1. Run backup script: `..\..\scripts\backup-repo.ps1` 2. Optionally: Set up Windows Task Scheduler 3. Verify backups are created **Result**: Automated daily backups! βœ… --- ## 🎨 **Usage Scenarios** ### **Scenario 1: Normal Development** ```powershell # Work on develop branch git checkout develop # Make changes, test git commit -am "Add feature" git push origin develop # When ready, create PR to main # Review and merge on GitHub ``` --- ### **Scenario 2: AI Experimentation** **You say to AI**: > "Switch to feature/experimental and add 5 crazy experimental features!" **AI workflow**: ```powershell git checkout feature/experimental # AI experiments freely git commit -am "Added experimental features" git push origin feature/experimental --force # Can do this! ``` **Your protection**: Main and develop are safe! βœ… --- ### **Scenario 3: Emergency Recovery** **If something breaks**: ```powershell # Option 1: Use reflog (undo last operations) git reflog git reset --hard HEAD@{5} # Option 2: Use backup branch git reset --hard backup-safe-2025-10-08 # Option 3: Restore from bundle git clone D:\Backups\notepadpp-mcp\[latest-bundle].bundle restored # Option 4: Re-clone from GitHub (nuclear option) git clone https://github.com/sandraschi/notepadpp-mcp.git ``` --- ## πŸ“Š **Protection Layers** Your repository is protected by **5 independent layers**: | Layer | What | Recovery Time | Auto | |-------|------|---------------|------| | **GitHub Remote** | All commits & history | Instant | βœ… | | **Git Reflog** | 90-day operation log | Instant | βœ… | | **Backup Branches** | Known-good states | Instant | Manual | | **Local Bundles** | Complete repo files | 5 minutes | Setup | | **Branch Protection** | PR-only workflow | N/A | Setup | **Combined**: Almost impossible to permanently lose code! πŸ›‘οΈ --- ## 🎯 **Best Practices** ### **Before AI Does Anything Risky** ```powershell # Create safety snapshot git branch backup-before-ai git push origin backup-before-ai ``` ### **Daily Routine** ```powershell # Run backup ..\..\scripts\backup-repo.ps1 # Check status git status git log --oneline -5 ``` ### **Weekly Maintenance** ```powershell # Verify backups exist Get-ChildItem D:\Backups\notepadpp-mcp\ # Sync branches git checkout develop git merge main git push origin develop ``` --- ## 🚨 **Emergency Contacts** ### **If Something Goes Wrong** 1. **Don't Panic** - Your code is safe on GitHub 2. **Check Reflog** - `git reflog` shows everything 3. **Check Backups** - Look in `D:\Backups\notepadpp-mcp\` 4. **Re-clone if Needed** - GitHub has everything ### **Common Issues** **"I can't push to main!"** - βœ… This is correct! Use PR workflow - Create branch β†’ Push β†’ Create PR β†’ Merge **"AI broke something on experimental!"** - βœ… That's fine! Experimental is expendable - Reset: `git reset --hard origin/develop` **"I lost uncommitted work!"** - Check: `git stash list` - Restore: `git stash pop` --- ## πŸ“‹ **Checklist** ### **Protection Setup** - [ ] Branch protection enabled on `main` - [ ] Backup script tested (`scripts\backup-repo.ps1`) - [ ] Backup branches created - [ ] Windows Task Scheduler configured (optional) - [ ] Recovery procedure tested ### **Workflow Understanding** - [ ] Know when to use `main` (production) - [ ] Know when to use `develop` (testing) - [ ] Know when to use `feature/experimental` (AI playground) - [ ] Understand PR workflow - [ ] Can create backup branches ### **Emergency Preparedness** - [ ] Know how to use `git reflog` - [ ] Know where backups are stored - [ ] Tested bundle restore - [ ] Can re-clone from GitHub - [ ] Have backup of backup branches --- ## πŸŽ“ **Learning Resources** ### **Git Basics** - [Git Reflog Explained](https://git-scm.com/docs/git-reflog) - [Branch Protection](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches) - [Pull Request Workflow](https://docs.github.com/en/pull-requests) ### **Advanced Topics** - [Git Bundles](https://git-scm.com/docs/git-bundle) - [Cherry-picking Commits](https://git-scm.com/docs/git-cherry-pick) - [Interactive Rebase](https://git-scm.com/docs/git-rebase) --- ## πŸ† **You're Protected!** With these three documents and tools, you have: βœ… **Branch protection** preventing accidents βœ… **Clear workflow** for AI collaboration βœ… **Multiple backups** for recovery βœ… **Safe playground** for experimentation βœ… **Emergency procedures** for any scenario **You can now safely say to AI**: > *"Let's experiment on feature/experimental and try some wild ideas!"* **And your production code stays 100% safe!** πŸ›‘οΈ --- ## πŸ“ž **Quick Reference** | Need | Document | Section | |------|----------|---------| | Setup protection | [BRANCH_PROTECTION_SETTINGS.md](BRANCH_PROTECTION_SETTINGS.md) | Quick Setup | | AI workflow | [BRANCH_STRATEGY_AND_AI_WORKFLOW.md](BRANCH_STRATEGY_AND_AI_WORKFLOW.md) | AI Prompts | | Create backup | [BACKUP_AND_RECOVERY_GUIDE.md](BACKUP_AND_RECOVERY_GUIDE.md) | Layer 4 | | Undo changes | [BACKUP_AND_RECOVERY_GUIDE.md](BACKUP_AND_RECOVERY_GUIDE.md) | Git Reflog | | Recover lost work | [BACKUP_AND_RECOVERY_GUIDE.md](BACKUP_AND_RECOVERY_GUIDE.md) | Emergency Recovery | --- ## πŸ”— **Related Documentation** ### **In This Repository** - [Main README](../../README.md) - Project overview - [CONTRIBUTING.md](../../CONTRIBUTING.md) - Contribution guidelines - [Build Scripts](../../scripts/) - Automation scripts ### **External Resources** - [GitHub Repository](https://github.com/sandraschi/notepadpp-mcp) - [Issue Tracker](https://github.com/sandraschi/notepadpp-mcp/issues) - [Pull Requests](https://github.com/sandraschi/notepadpp-mcp/pulls) --- *Repository Protection Documentation* *Created: October 8, 2025* *Location: `docs/repository-protection/`* *Status: Complete and Ready to Use* **Your repository is safer than Fort Knox!** πŸ°πŸ›‘οΈ

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sandraschi/notepadpp-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server