gitai commit¶
Generate a Conventional Commit message from the current Git diff.
gitai commit
gitai commit --staged
gitai commit --length short
gitai commit --length long
gitai commit --provider openai --model openai/gpt-5
gitai commit --apply
gitai commit --apply --yes
Diff Selection¶
--stagedrequires staged changes and summarizesgit diff --cached.- Without
--staged, staged changes are preferred when present. - If nothing is staged, unstaged tracked-file changes are summarized.
Untracked files are not included in Git diffs until they are staged.
Message Length¶
Use --length short to generate only the Conventional Commit title.
Use --length long to generate a title plus body details. This is the default.
Applying Commits¶
By default, gitai commit prints the generated message and does not create a
commit.
Use --apply to run git commit -F - with the generated message. The --apply
mode requires staged changes. Add --yes to skip the confirmation prompt.
Commit Standard¶
Commit titles are validated against the Conventional Commits format:
Allowed types are: