From d97c4ce4f0f9eb15ba432631d51c56193f8765e8 Mon Sep 17 00:00:00 2001 From: saravanakumardb1 Date: Sat, 14 Feb 2026 11:25:23 -0800 Subject: [PATCH] chore(workflows): rename repo workflows to repo_* prefix, add sync-repos, remove pull from backup --- ...n-branch.md => repo_backup-main-branch.md} | 0 ...-workspace.md => repo_commit-workspace.md} | 0 .windsurf/workflows/repo_sync-repos.md | 40 +++++++++++++++++++ scripts/backup-main.sh | 6 --- 4 files changed, 40 insertions(+), 6 deletions(-) rename .windsurf/workflows/{backup-main-branch.md => repo_backup-main-branch.md} (100%) rename .windsurf/workflows/{commit-workspace.md => repo_commit-workspace.md} (100%) create mode 100644 .windsurf/workflows/repo_sync-repos.md diff --git a/.windsurf/workflows/backup-main-branch.md b/.windsurf/workflows/repo_backup-main-branch.md similarity index 100% rename from .windsurf/workflows/backup-main-branch.md rename to .windsurf/workflows/repo_backup-main-branch.md diff --git a/.windsurf/workflows/commit-workspace.md b/.windsurf/workflows/repo_commit-workspace.md similarity index 100% rename from .windsurf/workflows/commit-workspace.md rename to .windsurf/workflows/repo_commit-workspace.md diff --git a/.windsurf/workflows/repo_sync-repos.md b/.windsurf/workflows/repo_sync-repos.md new file mode 100644 index 00000000..619f1200 --- /dev/null +++ b/.windsurf/workflows/repo_sync-repos.md @@ -0,0 +1,40 @@ +--- +description: Pull latest from origin main across all workspace repos +--- + +# Sync Repos + +Pulls the latest changes from `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 pull --ff-only origin main) +done +``` + +## What it does: + +1. Iterates over all 3 workspace repos +2. Runs `git pull --ff-only origin main` in each +3. Fails fast if there are local divergent commits (use `git pull --rebase` manually in that case) + +## Repositories: + +- learning_ai_common_plat +- learning_voice_ai_agent +- learning_multimodal_memory_agents + +## When to use: + +- Starting a new work session +- After pushing changes from another machine +- Before running `/repo_backup-main-branch` + +## Notes: + +- Uses `--ff-only` to prevent accidental merge commits +- If a repo has uncommitted changes, `git pull` will still work (fast-forward only) +- If a repo has diverged from origin, the pull will fail safely — resolve manually diff --git a/scripts/backup-main.sh b/scripts/backup-main.sh index 46aba921..8091b8c6 100755 --- a/scripts/backup-main.sh +++ b/scripts/backup-main.sh @@ -55,12 +55,6 @@ backup_repo() { git switch main 2>/dev/null || git checkout main fi - # Pull latest changes - echo -e " ${DIM}Pulling latest...${NC}" - if ! git pull origin main 2>/dev/null; then - echo -e " ${YELLOW}⚠️ Could not pull (might be offline)${NC}" - fi - # Check if working directory is clean if [ -n "$(git status --porcelain)" ]; then echo -e " ${RED}⚠️ Working directory not clean — skipping${NC}"