Smart PR & AI Commits
AI Commit Messages
Section titled “AI Commit Messages”Zgit can generate meaningful commit messages from your staged changes.
- Stage your changes (
Ctrl+S) - Click Generate in the commit panel (or
Ctrl+Shift+G) - The AI analyzes the diff and produces a Conventional Commits message
- Edit or accept
Example output:
feat: Add encrypted API key storage
- Implements AES-256-GCM encryption for provider API keys- Auto-generates encryption key on first use- Adds ProviderStatus struct with masked key displayThe prompt uses a Senior Dev persona to ensure production-quality output.
Smart PR Generation
Section titled “Smart PR Generation”Three-Dot Diff
Section titled “Three-Dot Diff”The PR generator uses a three-dot diff (base...head) to show only commits unique to the head branch:
git merge-base base head # find merge basegit diff base...head # three-dot diffThis avoids including commits already on the base branch, producing a focused PR description.
PR Dialog
Section titled “PR Dialog”- Navigate to the Pull Requests view
- Click New PR (
Ctrl+N) - Auto-detected branches:
- Base: defaults to
main/master - Head: defaults to
currentBranch
- Base: defaults to
- Click Generate with AI (
Ctrl+Shift+G) in the title row - Review auto-filled title and description
- Toggle Draft PR if needed
- Click Create PR
Prompt Structure
Section titled “Prompt Structure”The AI receives:
You are a Senior Developer reviewing a pull request.
Base branch: {base}Head branch: {head}
Git diff (base...head):{diff}
Generate a PR title and description following Conventional Commits...PR View
Section titled “PR View”The Pull Requests page displays:
- Open PRs — Active with CI status indicators
- Merged PRs — Successfully merged
- Closed PRs — Declined or abandoned
- Each PR card shows title, description, branch labels, CI status, reviews
zgit pr create --base main --head feature-branch --generate