learning_ai_common_plat/.windsurf/workflows/backup-main-branch.md
saravanakumardb1 ae2e757fb2 feat: add backup main branch workflow with smart duplicate detection
- Create Backup Main Branch skill with comprehensive documentation
- Add Windsurf workflow for easy access
- Implement bash script with multi-repo support
- Smart detection to avoid duplicate backups
- Automatic cleanup of old backups (keeps 7 days)
- Color-coded output for better visibility
- Always returns to main branch after backup
2026-02-12 19:54:29 -08:00

33 lines
759 B
Markdown

---
description: Smart backup of main branches with duplicate detection
---
# Backup Main Branch
Creates smart backups of main branches across all repositories.
// turbo
Run `bash scripts/backup-main.sh` from any repository root
## What it does:
1. Checks each repository for changes
2. Skips backup if main hasn't changed since last backup
3. Creates timestamped backup branch
4. Cleans up old backups (keeps 7 days)
5. Returns to main branch
## Repositories covered:
- learning_ai_common_plat
- learning_voice_ai_agent
- learning_multimodal_memory_agents
## Features:
- ✅ Smart duplicate detection
- ✅ Automatic cleanup of old backups
- ✅ Multi-repo support
- ✅ Safe operations (always returns to main)
- ✅ Color-coded output for clarity