## The two-step process

1. Extract a clean, structured log from git
2. Pass it to an AI with a prompt that specifies the output format you want

## Step 1: Get the right git log output

```bash
# All commits since the v1.0.0 tag, excluding merge commits
git log v1.0.0..HEAD --oneline --no-merges

# For a date-bounded range
git log --after="2026-01-01" --before="2026-03-06" --oneline --no-merges
```

The `--no-merges` flag is important — merge commits add noise without adding information.

## Step 2: Prompt the AI

Paste the log output into any AI chat tool:

```
Here is a git commit log for our project:

<paste log output>

Generate a user-facing changelog in Markdown.
Group entries under these headings (omit any with no entries):

## New Features
## Bug Fixes
## Performance Improvements
## Breaking Changes
## Internal / Developer Changes

Rules:
- Write for a developer audience
- Use plain English, not commit hashes
- Combine closely related commits into a single entry
- Ignore dependency bumps and code formatting commits
- Flag breaking changes prominently
```

Review the output before publishing. AI occasionally merges unrelated commits or misclassifies a fix as a feature. A 30-second read-through is enough.

## Why Conventional Commits make this better

If your team uses Conventional Commits (`feat:`, `fix:`, `perf:`, `feat!:` for breaking), the AI does not have to guess what category each commit belongs to — the prefix tells it directly.

## Dedicated tools

- **[git-cliff](https://git-cliff.org/)**: Rust-based changelog generator that reads Conventional Commits and produces a `CHANGELOG.md` using configurable templates. Runs in CI or locally.
- **[Release Please](https://github.com/googleapis/release-please-action)**: GitHub Action that opens a release PR automatically when new conventional commits land on your main branch.

For a complete walkthrough, see [deployhq.com/git/generating-changelogs-with-ai](https://deployhq.com/git/generating-changelogs-with-ai).