Describe a Commit
Generate and set a commit description. Defaults to @ (working copy), but typically used on @- (parent) when working copy is empty.
Process
- •Run
jj show <rev> --summaryandjj diff -r <rev> --statto get change overview (use@-for parent) - •Analyze changes:
- •Small (≤5 files, ≤200 lines): run
jj diff -r <rev>directly - •Large: use
/jj-contextfor structured summary
- •Small (≤5 files, ≤200 lines): run
- •Determine project prefix from file paths
- •Generate a one-line description:
<prefix>: <lowercase verb> <what changed> - •Run
jj describe <rev> -m "<description>"(e.g.,jj describe @- -m "...")
IMPORTANT: Always use a single-line commit message. Never use multi-line descriptions or bullet points.
Project Prefix Examples
Use the descriptive folder path identifying the subsystem:
- •
src/authfor authentication code - •
lib/utilsfor utility libraries - •
services/apifor API services - •
db/migrationsfor database changes
Good Description Examples
- •
src/auth: add JWT token refresh logic - •
lib/utils: fix date parsing for ISO formats - •
services/api: add rate limiting middleware - •
db/migrations: add users table - •
tests/integration: add checkout flow tests