From 416a8eed8441d4b0732913a65b0909cd31cb2f19 Mon Sep 17 00:00:00 2001 From: saravanakumardb1 Date: Sat, 21 Feb 2026 16:20:10 -0800 Subject: [PATCH] chore(workflows): add repo_push-repos and repo_backup-and-push workflows --- .windsurf/workflows/repo_backup-and-push.md | 51 +++++++++++++++++++++ .windsurf/workflows/repo_push-repos.md | 40 ++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 .windsurf/workflows/repo_backup-and-push.md create mode 100644 .windsurf/workflows/repo_push-repos.md diff --git a/.windsurf/workflows/repo_backup-and-push.md b/.windsurf/workflows/repo_backup-and-push.md new file mode 100644 index 00000000..68d226a3 --- /dev/null +++ b/.windsurf/workflows/repo_backup-and-push.md @@ -0,0 +1,51 @@ +--- +description: Backup main branches then push all repos to origin in sequence +--- + +# Backup & Push All Repos + +Combines `/repo_backup-main-branch` and `/repo_push-repos` into a single sequential workflow. Ideal for end-of-session save-all. + +## Step 1: Backup main branches + +Creates timestamped backup branches with smart duplicate detection. + +// turbo +Run `bash scripts/backup-main.sh` from any repository root + +## Step 2: Push all repos to origin + +// turbo + +```bash +for repo in learning_ai_common_plat learning_voice_ai_agent learning_multimodal_memory_agents; do + echo "━━━ Pushing $repo ━━━" + (cd ~/code/mygh/$repo && git push origin main 2>&1) +done +echo "" +echo "✨ All repos pushed!" +``` + +## What it does: + +1. **Backup** — creates timestamped backup branches, cleans up old ones (7 days), skips duplicates +2. **Push** — pushes `main` to `origin/main` for all 3 repos + +## Repositories: + +- learning_ai_common_plat +- learning_voice_ai_agent +- learning_multimodal_memory_agents + +## When to use: + +- End of a work session +- Before switching machines +- After a batch of commits across repos +- Anytime you want a safe checkpoint + sync to remote + +## Notes: + +- Backup runs first so the backup branch includes the latest local commits +- Push only pushes `main` — backup branches are pushed by the backup script itself +- If push fails (diverged remote), run `/repo_sync-repos` first to pull diff --git a/.windsurf/workflows/repo_push-repos.md b/.windsurf/workflows/repo_push-repos.md new file mode 100644 index 00000000..c349e065 --- /dev/null +++ b/.windsurf/workflows/repo_push-repos.md @@ -0,0 +1,40 @@ +--- +description: Push local main branch to origin for all 3 workspace repos +--- + +# Push Repos + +Pushes local `main` to `origin/main` for all workspace repositories. + +// turbo + +```bash +for repo in learning_ai_common_plat learning_voice_ai_agent learning_multimodal_memory_agents; do + echo "━━━ $repo ━━━" + (cd ~/code/mygh/$repo && git push origin main) +done +``` + +## What it does: + +1. Iterates over all 3 workspace repos +2. Runs `git push origin main` in each +3. Fails fast if a repo has diverged from remote (resolve with rebase manually) + +## Repositories: + +- learning_ai_common_plat +- learning_voice_ai_agent +- learning_multimodal_memory_agents + +## When to use: + +- After committing a batch of changes locally +- After running `/repo_commit-workspace` +- To sync local work to GitHub before switching machines + +## Notes: + +- Only pushes `main` — does not push other branches +- Will fail safely if remote has diverged — run `/repo_sync-repos` first then rebase +- Use `/repo_sync-repos` to pull before pushing if you've been working on another machine