Skip to content
  • English Deutsch

benjamin-abt.com

Performance is a feature | Cloud - AI - Azure - .NET - Sustainability

  • Home
  • Blog
  • Portfolio
    • Overview
    • Workshops & Training
    • Publications
  • Contact
  • Home
  • Blog

Setting up GitHub Copilot for Better Commit Messages in VS Code

Setting up GitHub Copilot for Better Commit Messages in VS Code
May 23, 2025 4 min read BEN ABT
VS Code GitHub GitHub Copilot

Look, we’ve all been there. It’s 11 PM, you’ve just fixed a nasty bug and you’re about to commit with “fix stuff” or “update things”. Six months later, you’re staring at your git history wondering what the hell you were thinking.

GitHub Copilot Chat can actually help here, but only if you configure it properly. Here’s how I set up my VS Code to make Copilot generate proper commit messages following Conventional Commits.

Why I Actually Care About Commit Messages Now

After years of writing garbage commit messages, I finally got convinced when I saw how much easier my life became:

  • Git history becomes readable: git log --oneline actually tells a story
  • Automated versioning: Tools like semantic-release can bump versions automatically
  • No more manual changelogs: Your commit history IS your changelog
  • Code reviews don’t suck: Reviewers immediately understand what changed

Opening VS Code Settings

Quick way:

  1. Ctrl+Shift+P → “Preferences: Open Settings (JSON)”
  2. Or just search for settings.json in the Command Palette

Configuring Copilot Commit Instructions

Here’s the configuration I use in all my projects:

JSON
 1{
 2  "github.copilot.chat.commitMessageGeneration.instructions": [
 3    { "text": "Use conventional commit format: type(scope): description" },
 4    { "text": "Use imperative mood: 'Add feature' not 'Added feature'" },
 5    { "text": "Keep subject line under 50 characters" },
 6    { "text": "Use types: feat, fix, docs, style, refactor, perf, test, chore, ci" },
 7    { "text": "Include scope when relevant (e.g., api, ui, auth)" },
 8    { "text": "Reference issue numbers with # prefix" }
 9  ]
10}

Important: The order matters - Copilot processes these instructions from top to bottom.

Understanding the Commit Types

Here’s what each type actually means in practice:

  • feat: New features (feat(auth): add OAuth2 login)
  • fix: Bug fixes (fix(api): handle null response in user endpoint)
  • docs: Documentation changes (docs: update API documentation)
  • style: Code formatting, no logic changes (style: fix indentation)
  • refactor: Code restructuring without new features (refactor(db): extract connection logic)
  • perf: Performance improvements (perf(query): optimize database query)
  • test: Adding/changing tests (test(auth): add unit tests for login)
  • chore: Build system, dependencies (chore: update dependencies)
  • ci: CI/CD changes (ci: add Docker build step)

The type(scope): description format helps you understand what changed at a glance.

How It Works in Practice

  1. Stage your changes in the Source Control view (Ctrl+Shift+G)
  2. Type /generate commit in the commit message field
  3. Copilot generates a message based on your configured rules
  4. Review the message, adjust if needed, commit

Example: After changes to a user API, Copilot generates:

1feat(api): add user profile endpoint
2
3- Add GET /api/users/profile route
4- Include user preferences in response
5- Add authentication middleware

Customizing Further

Want to make it even more specific? Add instructions like:

  • Project-specific scopes: { "text": "Use scopes: frontend, backend, database, config" }
  • Ticket format: { "text": "Append ticket numbers like PROJ-123" }
  • Breaking changes: { "text": "Mark breaking changes with BREAKING CHANGE footer" }

Team-Wide Configuration

Drop this into your repo’s .vscode/settings.json and commit it:

JSON
 1{
 2  "github.copilot.chat.commitMessageGeneration.instructions": [
 3    { "text": "Use conventional commit format: type(scope): description" },
 4    { "text": "Use imperative mood: 'Add feature' not 'Added feature'" },
 5    { "text": "Keep subject line under 50 characters" },
 6    { "text": "Use types: feat, fix, docs, style, refactor, perf, test, chore, ci" },
 7    { "text": "Include scope when relevant (e.g., api, ui, auth)" },
 8    { "text": "Reference issue numbers with # prefix" }
 9  ]
10}

Now everyone on your team gets consistent commit messages without any nagging.

What I’ve Learned

After using this setup for a few months:

  • It’s not perfect: Sometimes you need to tweak the generated message
  • Context matters: The better your staged changes are organized, the better the messages
  • It gets better: Copilot seems to learn from your corrections over time
  • Team adoption: Once people see good commit messages being generated, they start using it

The Bottom Line

Good commit messages aren’t just about being pedantic - they actually make development easier. When you can quickly scan git log and understand what happened, when git bisect gives you meaningful context and when your automated tools can parse your history properly, you’ll wonder why you didn’t do this sooner.

Set it up once, get better commit messages forever. That’s a pretty good deal.


Check out the Conventional Commits specification if you want to dive deeper into the format.

Related articles

Using MiMo V2.5 with GitHub Copilot BYOK and OpenCode Zen (Promo)

May 27, 2026 - 9 min read

Using MiMo V2.5 with GitHub Copilot BYOK and OpenCode Zen (Promo)

MiMo V2.5 is the latest reasoning and coding model from Xiaomi’s AI lab. Xiaomi positions MiMo as a general-purpose reasoning model …

Using OpenAI Models in VS Code with GitHub Copilot BYOK

May 24, 2026 - 8 min read

Using OpenAI Models in VS Code with GitHub Copilot BYOK

GitHub Copilot’s pricing shift from flat premium request units to token-based GitHub AI Credits, scheduled for June 1, 2026, changes …

Using Kimi K2.5 and DeepSeek V4 in VS Code with GitHub Copilot BYOK and OpenCode

May 23, 2026 - 10 min read

Using Kimi K2.5 and DeepSeek V4 in VS Code with GitHub Copilot BYOK and OpenCode

GitHub Copilot is moving into a different cost model. GitHub announced that Copilot plans will transition from premium request units to …


BEN ABT

BEN ABT

Ben is Chief Engineering Officer and Principal Software Engineer at Medialesson.de, with a strong focus on .NET and Microsoft Azure. In his professional role, he designs and builds highly scalable platforms for hybrid and cloud-based scenarios. He also advises companies and C-levels on migrating to the sovereign cloud.

He runs myCSharp.de, the largest and most active German-speaking C# community forum, actively contributes to both his own and external open-source projects and regularly shares his knowledge through his blog, at community events, conferences and as a writer for technical magazines.

Let's Work Together

Looking for an experienced Platform Architect or Engineer for your next project? Whether it's cloud migration, platform modernization or building new solutions from scratch - I'm here to help you succeed.

New Platforms

Modernization

Training & Consulting

Contact Me
X Facebook LinkedIn WhatsApp
Back Next Blog Post

Open for work!

Contact Me
BEN ABT BEN ABT Software Engineer · Microsoft MVP Passionate about .NET, Azure, performance optimization and sustainable software engineering.

Medialesson GmbH Logo

Microsoft MVP Logo

Recent posts

View all
Stop Using nginx as Your Default Static File Server in Docker

Stop Using nginx as Your Default Static File Server in …

Oct 24, 2026
Containerizing .NET in 2026 Without a Dockerfile

Containerizing .NET in 2026 Without a Dockerfile

Oct 20, 2026
Problem Details in ASP.NET Core and .NET 11

Problem Details in ASP.NET Core and .NET 11

Oct 5, 2026
Resilience in .NET with Microsoft.Extensions.Resilience

Resilience in .NET with Microsoft.Extensions.Resilience

Sep 21, 2026
What Matters in ASP.NET Core 11

What Matters in ASP.NET Core 11

Sep 14, 2026

Tags

.NET (192) Csharp (96) ASP.NET Core (48) Azure (41) DevOps (17) Docker (14) Microsoft (14) EF Core (11) Microsoft MVP (11) AI (10) GitHub (10) GitHub Copilot (10) ASP.NET (9) Security (9) Synology (9) Architecture (8) Raspberry (8) Azure Functions (7) Cloudflare (7) Bicep (6)
benjamin-abt.com

About BEN

Benjamin Abt is a Software Engineer, Platform Architect and Microsoft MVP specializing in .NET, Azure, cloud architecture, performance optimization and sustainable software development.

Connect

  • Follow me on GitHub
  • Follow me on LinkedIn
  • Follow me on Mastodon
  • Microsoft MVP profile
  • Follow SchwabenCode on GitHub
  • Follow me on X

Quick Links

  • Portfolio
  • Blog
  • Workshops & Training
  • Publications
  • Get in Touch
  • Sitemap
Open for Work

© Copyright Benjamin Abt & SchwabenCode | 2011 - 2026

Content licensed under CC BY 4.0 unless otherwise noted.

  • Impressum
  • Privacy
  • Contact