Skip to main content

Powershell Git Module

LinkDescription
Posh-Git InstallationInstallation instructions for the Posh-Git module.

Install Posh-Git Module​

posh-git is available via the Powershell Gallery, Chocoloatey, Scoop or for manual installation.

Using Powershell Gallery, I installed using the following command: -

install-module -name 'posh-git' -scope currentuser -force

Using Posh-Git Module​

Import the posh-git module using your profile by running the following command: -

Add-PoshGitToProfile -AllHosts -Verbose

This will update the All Hosts ~/Powershell/profile.ps1 profile location with the Import-Module posh-git command.

To test that it's working, navigate to a git repository in your terminal and then try to tab complete a branch or a git command.

posh-git autocomplete
posh-git Autocomplete