- Create repos.txt as single source of truth for all 7 workspace repos - Update all repo-management workflows to source from repos.txt: - repo_sync-repos, repo_push-repos, repo_backup-and-push - repo_backup-main-branch, repo_commit-workspace Benefits: - One file to update when adding/removing repos - Consistent repo list across all workflows - Scripts can read repos.txt for automation
1.1 KiB
1.1 KiB
| description |
|---|
| Pull latest from origin main across all 7 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:
- Iterates over all 7 workspace repos
- Runs
git pull --ff-only origin mainin each - Fails fast if there are local divergent commits (use
git pull --rebasemanually 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-onlyto prevent accidental merge commits - If a repo has uncommitted changes,
git pullwill still work (fast-forward only) - If a repo has diverged from origin, the pull will fail safely — resolve manually