- 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
3.1 KiB
3.1 KiB
| description | date |
|---|---|
| Commit all workspace changes in logical order with intelligent messages | 2025-02-12 |
Commit Workspace
Scans all repositories for pending changes and commits them in logical order with intelligent commit messages.
// turbo ~/commit-workspace.sh
What it does:
- Scans all repos for changes (reads from
repos.txt):
See repos.txt for the canonical list of all workspace repositories.
-
Analyzes changed files to determine:
- Commit scope (auth, ci, docs, feat, chore, etc.)
- Appropriate commit message
- Logical grouping
-
Commits in dependency order:
- Always commits common platform first
- Then other repos
-
Does NOT push — use
/repo_sync-reposorgit pushseparately
Commit Message Logic:
The script analyzes file types to generate appropriate messages:
| File Pattern | Commit Message Example |
|---|---|
| auth/middleware/jwt files | feat(auth): update authentication and middleware |
| .github/workflows/ | ci: update CI/CD configuration |
| Dockerfile + package.json | feat: update Dockerfile for pnpm workspace support |
| package.json, lock files | chore: update dependencies |
| *.md files | docs: update documentation |
| *.py, requirements.txt | feat(python): update Python modules |
| test/, spec | test: add/update tests |
| .env, config files | chore: update configuration |
| Other files | chore: update project files |
Usage:
# Run from anywhere
~/commit-workspace.sh
# Or via Windsurf
/commit-workspace
Example Output:
📋 Scanning workspace for changes...
📁 learning_ai_common_plat:
- 2 staged
- 1 modified
📁 learning_voice_ai_agent:
- 3 untracked
Found changes in 2 repo(s)
🚀 Committing in dependency order...
📝 Committing learning_ai_common_plat...
Message: feat(auth): update authentication and middleware
✅ Committed
📝 Committing learning_voice_ai_agent...
Message: docs: update documentation
✅ Committed
✨ All changes committed locally!
💡 Use /repo_sync-repos or git push to push to remote
Features:
- ✅ No prompts - fully automated
- ✅ Intelligent commit messages
- ✅ Logical dependency order
- ✅ Stages all changes automatically
- ✅ Local commits only (no push)
- ✅ Clean, colored output
Safety:
- Always shows what will be committed
- Uses conventional commit format
- Commits in correct order to avoid issues
- Preserves all changes
When to Use:
- After making changes across multiple repos
- Before switching contexts/tasks
- At the end of a development session
- When preparing for releases
Notes:
- Script location:
~/commit-workspace.sh - Requires git access to all repos
- Works with any branch (but assumes main is primary)
- Will skip repos with no changes