1.4 KiB
1.4 KiB
Commit Command
Description
Create a git commit following Nx repository standards and validation requirements.
Usage
/commit [message]
What this command does:
- Pre-commit validation: Runs the full validation suite (
pnpm nx prepush) to ensure code quality - Formatting: Automatically formats changed files with Prettier
- Testing: Runs tests on affected projects to validate changes
- Commit creation: Creates a well-formed commit with proper message formatting (without co-author attribution)
- Status reporting: Provides clear feedback on the commit process
Workflow:
- Format any modified files with Prettier
- Run the prepush validation suite
- If validation passes, stage relevant changes
- Create commit with descriptive message
- Provide summary of what was committed
Commit Message Format:
- Use conventional commit format when appropriate
- Include scope (e.g.,
feat(core):,fix(angular):,docs(nx):) - Keep first line under 72 characters
- Include detailed description if needed
Examples:
/commit "feat(core): add new project graph visualization"/commit "fix(react): resolve build issues with webpack config"/commit "docs(nx): update getting started guide"
Validation Requirements:
- All tests must pass
- Code must be properly formatted
- No linting errors
- E2E tests for affected areas should pass