GitHub Awesome Copilot Git Commit
Supported tasks
Commit generation
- Generate Conventional Commit messages from Git diffs
- Analyze the current working tree using
git diff - Generate commit messages from staged changes using
git diff --cached - Infer the best commit type from the actual intent of the change
- Recommend an appropriate scope when it improves clarity
- Write concise subjects in the imperative mood (≤72 characters)
- Generate optional commit bodies explaining what changed and why
- Generate footers for issue references and breaking changes
Commit review
- Review uncommitted Git changes before creating commits
- Detect unrelated changes mixed in the same diff
- Recommend splitting large changes into multiple atomic commits
- Explain why commits should be separated
- Generate one Conventional Commit for each logical change
- Ignore whitespace-only changes unless intentional
Interactive Git workflow
- Review
git diffbefore staging - Review
git diff --cachedbefore committing - Suggest files that should be committed together
- Recommend staging strategies using
git add -p - Help create clean Git history with atomic commits
Validation
- Validate commit messages against Conventional Commits 1.0.0
- Detect incorrect types, scopes, formatting, or grammar
- Suggest improved commit messages
- Validate subject length
- Detect non-imperative subjects
- Detect unnecessary scopes
Pull requests
- Generate PR titles from commits
- Generate concise PR descriptions
- Summarize major changes
- Highlight breaking changes
- List testing notes
- Draft reviewer checklists
Releases
- Generate changelog entries
- Group commits into release categories
- Draft release notes
- Detect breaking changes
- Generate migration notes
- Summarize notable improvements
Key prompts
Generate commit from current changes
- "Analyze the current Git working tree by running
git diffand generate the best Conventional Commit." - "Review my current changes and recommend whether they should be split into multiple commits."
- "Generate a Conventional Commit from the current unstaged changes."
- "Generate a Conventional Commit from
git diff --cached."
Generate commit from provided diff
- "Generate a Conventional Commit from this Git diff."
- "Analyze this patch and create the best Conventional Commit."
- "Determine the intent of this change instead of describing modified files."
- "Write a complete multi-line Conventional Commit including body and footer."
Improve commit quality
- "Recommend a better commit scope."
- "Suggest a shorter commit subject."
- "Rewrite this commit message following Conventional Commits."
- "Explain why this commit should be split."
Git workflow
- "Review my Git changes before I commit."
- "Suggest a clean staging strategy using
git add -p." - "Identify unrelated modifications."
- "Recommend the optimal commit order."
Validation
- "Validate this Conventional Commit."
- "Explain why this commit message is invalid."
- "Rewrite this commit following Conventional Commits 1.0.0."
Pull requests
- "Generate a PR title from these commits."
- "Generate a complete PR description."
- "Summarize these commits for reviewers."
Releases
- "Generate changelog entries from these commits."
- "Draft release notes for the next version."
- "Generate migration notes for breaking changes."
Best practices
- Always prioritize atomic commits.
- Focus on the intent of the change rather than modified filenames.
- Infer the correct commit type from behavior, not keywords.
- Add a scope only when it provides meaningful context.
- Keep commit subjects concise, imperative, and under 72 characters.
- Do not end commit subjects with a period.
- Include a body only when it adds useful context.
- Recommend splitting unrelated changes into separate commits.
- Prefer
git add -pover staging everything when unrelated changes exist. - Review
git diffbefore staging. - Review
git diff --cachedbefore committing. - Generate release notes from grouped Conventional Commits.
- Follow Conventional Commits 1.0.0 whenever possible.
Temporary files
- Never create temporary patch or diff files (for example
*.patchor*.diff) unless the user explicitly requests them. - Prefer piping output directly to Git or the terminal instead of writing temporary files.
- If a temporary file is required during execution, treat it as ephemeral:
- Before creating a temporary file, verify whether it is ignored by Git (
.gitignore); if not, avoid creating it or remove it before completing the task. - Remove the file before completing the task.
- Never leave temporary artifacts behind or include them in commits.
- Before creating a temporary file, verify whether it is ignored by Git (
Conventional Commit types
- feat — Introduce a new feature
- fix — Fix a bug
- refactor — Improve code without changing behavior
- perf — Improve performance
- docs — Documentation only
- style — Formatting without behavior changes
- test — Add or update tests
- build — Build system or dependencies
- ci — Continuous integration
- chore — Maintenance tasks
- revert — Revert previous commits
Output guidelines
When generating commits:
- Analyze the complete Git diff.
- Identify the primary intent.
- Detect unrelated logical changes.
- Recommend splitting commits when appropriate.
- Produce valid Conventional Commit messages.
- Keep the history clean and review-friendly.
- Generate bodies only when they improve understanding.
- Include breaking-change footers when necessary.
Preferred output format:
type(optional-scope): concise imperative subject
Optional body explaining what changed and why.
BREAKING CHANGE: description (if applicable)