Introduction

The new Windows Terminal has arrived on Visual Studio 2019 16.6 for Windows and Visual Studio 8.6 for Mac. In this article I will show how to enhance it with posh-git for a better experience with GIT commands.

Posh-Git

posh-git is a PowerShell environment for Git that provides powerful tab-completion facilities, as well as an enhanced prompt to help you stay on top of your repository status. Because The new terminal is compatible with PowerShell (and also classical command prompt) we are able to use them together for a better experience with GIT. Here is a tutorial to install it:

First, set the value of ExecutionPolicy to RemoteSigned for all users use the next command:

Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy RemoteSigned -Force

Then install it from the PowerShell gallery:

Install-Module posh-git -Scope CurrentUser -Force

At least update your PowerShell prompt with the following command:

Add-PoshGitToProfile -AllHosts

You can find here more documentation about it: https://github.com/dahlbyk/posh-git

Demo

Now you can open a new Windows Terminal from the menu here:

#visual studio #git #posh-git #visual studio 2019

Visual Studio 2019: New Windows Terminal has arrived
2.05 GEEK