learning_ai_common_plat/.windsurf/workflows/repo_sync-repos.md
2026-03-24 16:05:12 -07:00

1.1 KiB

description
Pull latest from origin main across all managed workspace repos

Sync Repos

Pulls the latest changes from origin/main for all workspace repositories.

// turbo

while IFS= read -r repo; do
  [[ -z "$repo" || "$repo" =~ ^# ]] && continue
  echo "━━━ $repo ━━━"
  (cd ~/code/mygh/$repo && git pull --ff-only origin main)
done < ~/code/mygh/learning_ai_common_plat/.windsurf/workflows/repos.txt

What it does:

  1. Iterates over all repositories listed in the canonical repos.txt
  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:

See repos.txt for the canonical list of all workspace repositories.

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