From the course: AI-Powered Development: GitHub Copilot in Visual Studio
Commit message customization - Visual Studio Tutorial
From the course: AI-Powered Development: GitHub Copilot in Visual Studio
Commit message customization
- [Presenter] When you are working on a team, chances are you already follow coding standards. You might also have testing standards. And just like those, some teams will also have commit standards, a standard format that every commit message should follow. So for example, on our team, we wanna have a short paragraph summary at the top, a bullet list item for each change. Our team likes to have emojis on each of these bulleted items. I'm not a fan of that, but our team wants it. And then they want a summary of the total files changed at the end of the commit message. These standards keep the history consistent, but remembering the right format every single time can be a bit of a hassle. So we can provide Copilot with commit message instructions, and it will apply these guidelines every single time you check in code. Here's our rules. Write a short paragraph summary at the top. Use a bulleted list, emojis, for each change. Be concise and clear. Avoid overly-detailed explanations. At the end of the message, include a summary of total files changed. So what we do is we copy this, we go to Tools, Options, we go to GitHub, Copilot, and then in this section, we wanna enable Git preview features, and then paste your instructions I copied from this Word doc into here, and then click on OK. Now, when I generate my commit message, it should follow the custom instructions. With a little customization, Copilot doesn't just make commit messages smarter. it makes them fit seamlessly into our team's workflow.