2.3 KiB
2.3 KiB
Commitly Skill
Use this skill when you need to commit and/or push changes across multiple git repositories in the monorepo.
What is Commitly?
Commitly is a Babashka script located at commitly/commitly that commits and pushes changes across all modified git subrepositories in the ajet-industries monorepo.
Usage
./commitly/commitly [-p] <commit-message>
Options
-p- Push changes after committing. If no commit message is provided with-p, it will skip committing and just push all subrepos.
Examples
Commit all modified repos with a message:
./commitly/commitly "fix: update configuration"
Commit and push all modified repos:
./commitly/commitly -p "feat: add new feature"
Just push all repos (no commit):
./commitly/commitly -p
How It Works
- Discovery: Scans the current directory for subdirectories containing
.gitfolders - Detection: Checks each repository for uncommitted changes using
git status --porcelain - Commit: Runs
git add -Aandgit commit -m "<message>"for each modified repo - Push: If
-pflag is present, runsgit pushfor each successfully committed repo (or all repos if no message provided)
When to Use
Use commitly when you've made changes across multiple services (service-manager, www, gateway, etc.) and want to commit them all with the same message, rather than cd-ing into each directory individually.
Architecture Context
The monorepo contains multiple independent git repositories:
service-manager/- Orchestration servicewww/- Dashboard websitegateway/- Nginx reverse proxycommitly/- This tool itselfjust-vibes/- Other projects
Each has its own .git directory and is deployed independently via Gitea Actions when pushed to main.
Error Handling
- If any repository fails to commit, commitly exits with code 1 and reports which repos failed
- If any repository fails to push (when
-pis used), commitly exits with code 1 and reports which repos failed - Repos are processed independently - one failure doesn't stop others from being processed
Requirements
- Babashka must be installed (
bbcommand available) - The script must be executable:
chmod +x commitly/commitly - Each subrepo must have a git remote configured for pushing