Git Tools in Visual Studio 2019
Git tools have been an integral Visual Studio extension for a long time. Now, with the 2019 upgrade, Git tools have upgraded, too. The Git tools in Visual Studio previously consisted of tools like git changes window, graphical git history viewer, menus to launch Git Bash, Git Extensions, and TortoiseGit.
The Git tools in Visual Studio 2019 have further extensions and can run side by side with Microsoft Git. Because Visual Studio allows only one active source control provider at any given time, Git Tools' standalone extension is compatible with Microsoft Git and runs alongside it. The Git Tools 2019 is modified to adopt the new asynchronous extension architecture and is compiled from the VS2019 branch.
Hence, this has helped improve workflow with GitHub, Azure, Repos, etc., and better the conditions to work with code. The Git tools have the following new features:-
Create new branches
Toggling gaily between your work and code can be tiresome as you prioritize your focus on one over the other. But with the new Git tools experience, you get to work with your daily workflow without abandoning your code once you initialize the repository. Now the Git menu and the Git Toolwindow allow you to create branches that enable you to commit code changes, and hence, seamlessly transition between the code and other workloads.
Git Changes Window
The Git Changes Window has been a popular feature of Git Tools throughout and helps in displaying changes in the Git repository. Hence, you get to see the changes made to your files and compare them. Begin by clicking on the ‘changed files.’ Here, the diff viewer on the right side will show you all the changes and differences in the content of the files. And hence, you can review your files and changes made.
You can also view the lines and the code that is changed. For this, you will have to double click on the changes in the diff viewer, and it automatically takes you to the modified lines by loading the changed file into the central console. Here, you can view the changes, adjust them as needed, enter comments where required, and commit.
Git Changes Window is highly beginner-friendly and allows you to complete this process in the Simple Mode itself. The Simple Mode allows you to make changes without bothering with Git index, area, etc.
Initialize and Push
By Using initialize and Push, you get to push files to local or remote hosting services easily. Hence, you simply have to initialize a local Git repository and then move it to GitHub, Azure Repos, or other services of choice. You can also quickly clone any code if you have a current online project using the built-in GitHub and Azure Repos browsing experiences.
If you are an expert Git Tool user and want to see changes at their core, the advanced mode is for you. With this mode, you can stage and un-stage files or selected parts of files in the diff viewer. You can also reset or undo your made changes.
Other useful articles:
- How To Get Started With Visual Studio
- Main Visual Studio Keyboard Shortcuts
- Visual Studio Versions and Features
- Visual Studio Community Vs. Professional Vs. Enterprise
- Install Visual Studio Code For Java
- How To Edit Code in Visual Studio (Editing Features)
- Visual Studio Cheat Sheet
- Visual Studio Interview Questions
- Visual Studio Code Vs. PyCharm 2021
- Visual Studios 2019 Vs. 2017
- IntelliCode/IntelliSense in Visual Studio
- Git Tools in Visual Studio 2019
- How to Run C# Script in Visual Studio Code
- Git Instruments in Visual Studio 2019
- Visual Studio Automation Explained