.roo/commands/commit.md
Analyze the current changes to understand what needs to be committed:
# Check for staged and unstaged changes
git status --short
# View the diff of all changes (staged and unstaged)
git diff HEAD
Based on the diff output, formulate a commit message following conventional commit format:
Format: type(scope): brief description
Examples:
feat(api): add user authentication endpointfix(ui): resolve button alignment on mobilerefactor(core): simplify error handling logicdocs(readme): update installation instructionsStage all unstaged changes:
git add -A
Commit with the generated message:
git commit -m "type(scope): brief description"
If pre-commit hooks fail:
git add -Agit commit -m "type(scope): brief description"Push to the remote repository:
git push
If pre-push hooks fail:
git pushTips for good commit messages:
Common hook failures and fixes:
npm run lint or pnpm lint) to see all issues, then fix themnpx tsc --noEmit) to identify type issuesnpm test or pnpm test) to identify failing tests and fix themnpm run format or pnpm format) to auto-fix formatting