Using GitHub Copilot to Generate Conventional Commit Messages in VSCode and IntelliJ IDEA

06 Aug 2025
3 mins read

In this tutorial, you’ll learn how to supercharge your Git workflow by using GitHub Copilot to generate commit messages that follow the Conventional Commits standard—directly inside both VS Code and IntelliJ IDEA. We’ll cover setup, best practices, and tips for both editors, so you can keep your commit history clean, consistent, and meaningful.

VS Code Copilot Commit Message screenshot

Why Conventional Commits?

Conventional Commits provide a simple, human- and machine-readable convention for commit messages. This makes it easier to automate releases, generate changelogs, and understand project history at a glance. With Copilot, you can automate the process and avoid the mental overhead of crafting the perfect message every time.

Using Copilot for Commit Messages in VS Code

GitHub Copilot can suggest commit messages based on your staged changes, making it easy to follow the conventional format. Here’s how to get started:

VS Code Copilot Commit Message screenshot

Configure Custom Instructions for Commit Messages in VS Code

To ensure Copilot generates messages in the conventional format, you can set custom instructions in your settings:

"github.copilot.chat.commitMessageGeneration.instructions": [
  { "text": "Use conventional commit format: type(scope): description." },
  { "text": "Use imperative mood: 'Add feature' not 'Added feature'." },
  { "text": "Keep subject line under 50 characters." },
  { "text": "Use types: feat, fix, docs, style, refactor, perf, test, chore, ci." },
  { "text": "Include scope when relevant (e.g., api, ui, auth)." },
  { "text": "For additional details, use a well-structured body section." },
  { "text": "Use bullet points (*) for clarity." }
]

You can also save these instructions in a file for easy sharing with your team. The file key should point to the filename (e.g., global-git-commit-instructions.md), not the instruction text itself:

"github.copilot.chat.commitMessageGeneration.instructions": [
  { "file": "path/to/file/global-git-commit-instructions.md" }
]

Then, in your global-git-commit-instructions.md file, add your actual instructions (one per line or as a markdown list). This tells Copilot to load all instructions from that file.

Using Copilot for Commit Messages in IntelliJ IDEA

IntelliJ IDEA also supports Copilot’s commit message generation, making it easy to keep your workflow consistent across editors.

1. Enable Copilot in IntelliJ IDEA

IntelliJ Copilot Commit Message screenshot

Configure Custom Instructions for Commit Messages in IntelliJ IDEA

IntelliJ Copilot Custom Instructions screenshot

If you select Global, IntelliJ will create a global-git-commit-instructions.md file and you can add the instructions as desired.

Use conventional commit format: type(scope): description.
Use imperative mode: 'Add feature' not 'Added feature'.
Keep subject line under 50 characters.
Use types: feat, fix, docs, style, refactor, perf, test, chore, ci.
Include scope when relevant (e.g., api, ui, auth).
For additional details, use a well-structured body section.
Use bullet points (`*`) for clarity.

.

Global Git Commit Instructions screenshot

Best Practices & Tips

References

Have you tried feature this yet?

Happy Coding!