Commit Changes
Instructions
Check current status:
git status --porcelainIf no staged changes, stage all modified files:
git add -AReview changes to be committed:
git diff --cached --stat git diff --cachedSecurity check: Scan diff for sensitive data:
- API keys, tokens, passwords
- Private keys, certificates
- Environment secrets
- If detected, STOP and warn user
Analyze changes and determine commit type:
feat:- New feature or functionalityfix:- Bug fixchore:- Maintenance, dependencies, releasedocs:- Documentation onlystyle:- Code formatting, no logic changerefactor:- Code restructure without behavior changetest:- Adding or updating tests
Generate commit message:
- Format:
<type>: <description> - Description should be concise (under 72 chars)
- Focus on "what" and "why", not "how"
- Use lowercase, no period at end
- Examples from this repo:
feat: openclaw support streaming settingsfix: openclaw profile apply policydocs: update changelog for v0.3.2style: format Rust code
- Format:
Execute commit:
git commit -m "<type>: <description>"If commit fails due to pre-commit hooks:
- Review hook output
- Fix issues or include auto-fixed files
- Retry commit once
Verification
- Confirm
git statusshows clean working tree after commit - Confirm commit message follows conventional format
- Confirm no sensitive data was committed
Converted and distributed by TomeVault — claim your Tome and manage your conversions.