chore(workflows): add repo_push-repos and repo_backup-and-push workflows

This commit is contained in:
saravanakumardb1 2026-02-21 16:20:10 -08:00
parent b1d2e4ec81
commit 416a8eed84
2 changed files with 91 additions and 0 deletions

View File

@ -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

View File

@ -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