Skip to content

Commit Message Workflow

For the full command reference, see devo commit.

Learn how to generate conventional commit messages using AI.

Quick Start

# Stage your changes
git add .

# Generate commit message
devo commit

Workflow

1. Make Your Changes

Edit your files as usual:

vim src/auth.py
vim tests/test_auth.py

2. Stage Changes

# Stage specific files
git add src/auth.py tests/test_auth.py

# Or stage all changes
git add .

3. Generate Commit Message

devo commit

The AI analyzes your staged changes and generates a commit message. See devo commit for the full format specification and list of commit types.

4. Review and Commit

The tool shows the generated message. You can:

  • Accept it and commit
  • Edit it before committing
  • Cancel and modify your changes

Ticket Number Extraction

Branch Naming Convention

Use this format for automatic ticket extraction:

<type>/<TICKET-NUMBER>-description

Examples:

  • feature/XYZ-123-user-authentication
  • fix/ABC-456-login-bug
  • chore/DEV-789-update-dependencies

How It Works

The tool extracts the ticket number from your branch name and includes it in the commit message:

# Branch: feature/XYZ-123-add-auth
# Generated message:
feat(auth): XYZ-123 add JWT token validation

Complete Development Workflow

1. Create Feature Branch

git checkout -b feature/XYZ-123-add-authentication

2. Make Changes

vim src/auth.py
vim tests/test_auth.py

3. Review Code (Optional)

git add .
devo code-reviewer

4. Fix Issues and Stage

# Fix any issues found
vim src/auth.py

# Stage changes
git add .

5. Generate Commit Message

devo commit

6. Push Changes

git push origin feature/XYZ-123-add-authentication

Tips for Better Commit Messages

  1. Stage related changes together: Group related files for coherent messages
  2. Use descriptive branch names: Include ticket numbers for automatic extraction
  3. Review before committing: Run devo code-reviewer first
  4. Keep changes focused: Smaller commits get better messages
  5. Edit if needed: The generated message is a starting point

Troubleshooting

Generic Commit Message

For better messages:

  • Use descriptive branch names with ticket numbers
  • Stage related changes together
  • Make focused, single-purpose commits

For errors related to missing staged changes or AWS credentials, see the devo commit reference.

Next Steps