> ## Documentation Index
> Fetch the complete documentation index at: https://aysdog-mintlify-88c56c39.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Preview and customize your release changelog

> commitdog generates a grouped changelog from your conventional commits since the last tag. Preview it before releasing or use it standalone.

Every `commitdog release` automatically generates a changelog by reading your Git commit messages since the last tag. The changelog is grouped by conventional commit type and included in the release body on GitHub, GitLab, Gitea, and Forgejo. You can also preview the changelog at any time without triggering a release.

## Preview the changelog without releasing

Run the following command to print the grouped changelog for commits since your last tag:

```bash theme={null}
commitdog release --changelog-only
```

The output is printed directly to your terminal. No version bump, no build, no push — just the changelog.

## How the changelog is built

commitdog reads commit subject lines (the first line of each commit message) between the latest tag and `HEAD`, excluding merge commits. It then classifies each commit by its conventional commit prefix and groups them under the following sections, in this order:

| Section       | Matched prefixes                       |
| ------------- | -------------------------------------- |
| Features      | `feat:` or `feat(…):`                  |
| Bug Fixes     | `fix:` or `fix(…):`                    |
| Refactoring   | `refactor:` or `refactor(…):`          |
| Documentation | `docs:` or `docs(…):`                  |
| Chores        | `chore:` or `chore(…):`                |
| Other         | anything that does not match the above |

Commits that do not follow the `type:` or `type(scope):` convention are placed in the **Other** section. Empty sections are omitted entirely. If there are no commits since the last tag, the changelog reads `No changes.`

## Example output

Given a set of commits since the last tag, the output of `commitdog release --changelog-only` looks like this:

```text theme={null}
### Features
- feat: add gitlab gitea forgejo support
- feat(auth): add token refresh flow

### Bug Fixes
- fix: handle missing remote tag on first release

### Chores
- chore: update dependencies
```

The same text is used as the release body when you run `commitdog release` and confirm. commitdog shows it to you as a **changelog preview** step before asking for your final confirmation, so you can review it before anything is published.

## Changelog preview during release

During a normal `commitdog release` run, the changelog preview appears after you pick a version bump and before any changes are made:

```text theme={null}
  changelog preview:

  ### Features
  - feat: add gitlab gitea forgejo support

  release v0.2.8 → v0.2.9? [y/n] ›
```

If the changelog does not look right, press `n` to abort. Fix or amend the relevant commits, then run `commitdog release` again.

<Tip>
  Write your commit messages in conventional commit format — `feat:`, `fix:`, `chore:`, etc. — to get a clean, well-grouped changelog automatically. commitdog's commit suggestions already follow this format.
</Tip>
