News

Copilot AI Takes Over Git Commits in Visual Studio 2022

Add "write Git commits" to the growing list of developer tasks in Visual Studio 2022 that are now being handled by AI.

For those who might not be familiar, GitHub defines Git commits as: "snapshots of your entire repository at specific times ... based around logical units of change. Over time, commits should tell a story of the history of your repository and how it came to be the way that it currently is."

Now AI is helping document that repo history. While seemingly a small tweak, it illustrates how the Visual Studio dev team is continuously integrating AI for incremental productivity boosts. It is also a favorite feature of Mads Kristensen, principal product manager for Visual Studio, whose Oct. 30 tease post on social media garnered some 104,000 views.

After that tease and a follow-up "it's here" comment yesterday, Microsoft's Jessie Houghton published "Write Your Git Commits with GitHub Copilot," which explains how the new functionality can help developers in several ways, such as:

  • Your teammates can more effectively review your changes in a pull request
  • Your Git history tells a story that includes both "what" was changed and "why"
  • You can easily pinpoint the origins of a bug or breaking change
  • You save yourself and/or coworkers hours of digging around while troubleshooting
  • You make your repository easier to ramp up to and contribute to in the future
AI-Generated Commit in Animated Action
[Click on image for larger, animated GIF view.] AI-Generated Commit in Animated Action (source: Microsoft).

"Use the new 'Add AI Generated Commit Message' sparkle pen icon in the Git Changes window to generate a suggestion," Houghton said. "GitHub Copilot will look at the file changes in your commit, summarize them, and then describe each change. You can then 'Insert AI Suggestion' or 'Discard.'"

Click the Sparkle Pen Icon
[Click on image for larger view.] Click the Sparkle Pen Icon (source: X).

While providing the who, what, where and when details of a Git commit is probably pretty easy for AI, the "why" might be a bit harder, as one developer noted, so users can add their own input to augment the commit.

A Git Commit
[Click on image for larger view.] A Git Commit (source: Microsoft).

"We hope this new feature makes writing your Git commit messages easier -- leading to productivity for you, your teammates, and even 'future you' when reviewing your changes and helping others understand your Git history," Houghton concluded. "Share your thoughts with us, so we can continue to improve your experience."

She said those thoughts can be shared via Microsoft's Developer Community feedback/bug report/feature request site or the "report a problem" feature right in the IDE.

The new functionality can be found in the latest preview, which, following the recent release of v17.8, is now Visual Studio 2022 17.9 Preview 1.

As the new feature comes from the for-pay GitHub Copilot tool, an active subscription is required, along with an updated GitHub Copilot Chat extension. The latter has been downloaded some 155,000 times, while the main Copilot tool now sports some 671,000 downloads.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube