Git Tooling Preview Features to Enhance Productivity

Jessie Houghton

We’re excited to share productivity and quality of life improvements available to the Git experience in Visual Studio version 17.6 Preview 2. Download the latest Visual Studio Preview and watch our recent Visual Studio Toolbox Live session to check out the following new Git features.

New Feature (Links to the section of the post) Description
Improved Search for Related GitHub Issues and Azure DevOps Work Items Find all your related issues and work items from your commits with better search results.
Merge Enhancements Know when to expect merge conflicts – before you merge.
Stage and Commit During Build Avoid waiting for the build to end to commit your changes.
Git History Perf Improvements See your history results faster.
New Branch and Tag Naming Enhancements Avoid errors when creating new branches and tags.
Line unstaging Catch irrelevant code changes before you commit them.

During this release, we’ve improved on the Issues and Work Items integration in the commit message we introduced in 17.6 preview 1. You now get better search results when querying for items that you haven’t updated recently. You also can view items that aren’t related to you but are part of your project or repo without needing to know the id. The search works by matching complete strings in your items’ names. This can help minimize copy-pasting item ids between the browser and Visual Studio.

Merge Enhancements

We improved the merge dialog to give you more information and control over your merges. You now know how many files are being affected during a merge, which can help you avoid merging from the incorrect branch. Additionally, we’ll warn you if there might be conflicts.

Updated Merge Dialog

The checkbox also allows you to configure whether you’d like to automatically commit changes after the merge for each merge, instead of having to toggle that option in settings.

Stage and Commit During Build

We heard feedback that not being able to complete certain git operations during the build process hurt productivity. As a start, we’ve enabled staging your changes and committing your staged items while you’re waiting for the build. Committing directly is a risky operation since the build may add temporary files to your solution. To ensure you’re not accidentally committing any unintended changes, you can now stage them first, verify your files are correct, and then commit them.

Git History Perf Improvements

Improvements to our Git History now load previous commits faster, allowing you to dig into your file and folder history quicker than before. Time gain will vary based on how recently a file has been changed.

New Branch and Tag Naming Enhancements

Create New Branch

Improvements to the New Branch and New Tag dialogs automatically replace spaces with dashes to avoid invalid characters in the name. This makes copy-pasting issues names and numbers into branch names, a common flow for developers using issue tracking, much easier. No more fixing up the whitespace characters.

Line Unstaging

As we incrementally improve our line-staging (aka interactive staging) feature that we GA’d in version 17.3, we’ve added unstage. You can now use the hover option to unstage changes, line by line, as requested here.

Line unstage

Known issue: You’ll need to have current unstaged changes in your working directory to try this feature out.

Keep engaging with us

These productivity updates would not have been possible without your suggestions and feedback, so keep engaging with us on Developer Community to suggest new features for Visual Studio.