ARN

Microsoft previews Git improvements for Visual Studio

C++ reference searches, code clean-up, autosaves, and stack traces also get attention in planned upgrade.

With the second preview of its planned update to Visual Studio 2022, Microsoft is offering enhancements of the IDE’s Git experience, including capabilities for comparing branches and checking out commits.

Published January 5, Visual Studio 2022 17.1 Preview 2 is available from the Visual Studio website. In this version, developers can compare checked out Git branches with any local or remote branch. They also can check out the tip commit or any previous commit of remote and local branches.

Multi-repo branching, a preview feature to manage new branches on all active repositories simultaneously, now has an enhanced inner loop branching experience. A line-staging capability, still in preview, splits changes across different commits by staging sections of code changes.

For C++ projects, Visual Studio 2022 version 17.1 offers speedier “Find All References” searches, improved by 22 percent. For embedded development in C++, additional views are featured to interact with peripheral registers on microcontrollers and real-time OS objects.

Also in the Visual Studio 2022 17.1 Preview 2 is Personalised Code Clean-up files which can be configured to automatically run when a file is saved. This is intended to help minimise stylistic violations within pull requests and reduce time needed to fix code that does not meet specific standards.

Meanwhile, an autosave feature in preview will automatically save “dirty” documents when a Visual Studio application loses focus. A developer switching to other applications in Windows can have the IDE automatically commit changes to disk.

In addition, embedded source and Source Link are surfaced as part of “Go To Definition” if a referenced assembly has embedded source or Source Link. This enables developers to navigate to the original source files that declare the target symbol. Also, a new Stack Trace Explorer Window displays stack traces to navigate directly to related code.

Visual Studio 2022 17.1 follows the November 8 release of Visual Studio 2022, which was highlighted by new 64-bit capabilities. Visual Studio 2022 17.1 Preview 1 also was published on that date, followed by Visual Studio 2022 17.1 Preview 1.1 on November 16.