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

  • Hands On: New VS Code Insiders Build Creates Web Page from Image in Seconds

    New Vision support with GitHub Copilot in the latest Visual Studio Code Insiders build takes a user-supplied mockup image and creates a web page from it in seconds, handling all the HTML and CSS.

  • Naive Bayes Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the naive Bayes regression technique, where the goal is to predict a single numeric value. Compared to other machine learning regression techniques, naive Bayes regression is usually less accurate, but is simple, easy to implement and customize, works on both large and small datasets, is highly interpretable, and doesn't require tuning any hyperparameters.

  • VS Code Copilot Previews New GPT-4o AI Code Completion Model

    The 4o upgrade includes additional training on more than 275,000 high-quality public repositories in over 30 popular programming languages, said Microsoft-owned GitHub, which created the original "AI pair programmer" years ago.

  • Microsoft's Rust Embrace Continues with Azure SDK Beta

    "Rust's strong type system and ownership model help prevent common programming errors such as null pointer dereferencing and buffer overflows, leading to more secure and stable code."

  • Xcode IDE from Microsoft Archrival Apple Gets Copilot AI

    Just after expanding the reach of its Copilot AI coding assistant to the open-source Eclipse IDE, Microsoft showcased how it's going even further, providing details about a preview version for the Xcode IDE from archrival Apple.

Subscribe on YouTube

Upcoming Training Events