See What's New for Git in Latest Visual Studio 2022 Update
In the new Visual Studio 2022 Preview 2, four new features have been added to Git, the free and open source distributed version control system that powers Microsoft's GitHub and other code repository services.
Here's a quick look at the four new features:
Compare branches -- compare a checked-out branch with any local or remote branch. This feature provides an overview of differences between two branches which can be helpful in preparing a pull request, merge or deletion of a branch.
- Checkout commit -- checkout the tip commit or any previous commit of remote and local branches. Checking out the tip of a remote branch helps developers quickly review a pull request and evaluate the latest updates.
- Multi-repo branching -- manage and create new branches on all active repositories at the same time. Among other functionality, this lightweight branch management experience helps developers include updates from different remote branches. A developer can merge changes from someone else's branch by right-clicking on the branch under the Remotes tab and selecting Merge into Current Branch.
- Line-staging -- split changes across different commits by staging sections of code changes. Sometimes called "interactive staging," this is described as one of the most popular Git suggestion tickets. This is a work-in-progress preview and the dev team is still enhancing the small number of features included in Preview 2, so there are some known issues and limitations.
Going forward, planned features include:
- Ability to stage lines and chunks of code directly from the editor
- Ability to un-stage lines and chunks of code
- Refresh latency enhancements
All of the above is explained in detail in a Jan. 6 blog post.
David Ramel is an editor and writer for Converge360.