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 for Converge360.

comments powered by Disqus


Subscribe on YouTube