DEV Community

Aashutosh Poudel
Aashutosh Poudel

Posted on

20 2

Adding Git autocomplete to PowerShell (Windows)

In order to get bash like git autocomplete in Powershell, install the posh-git package.

  1. Fulfill the conditions mentioned in the prerequisite:
    https://github.com/dahlbyk/posh-git#prerequisites
    a. Make sure PowerShell version greater than 6 is installed.
    b. Make sure git is installed and in the PATH.
    c. Make sure the script execution policy is set to RemoteSigned or Unrestricted.

  2. In PowerShell execute:

PowerShellGet\Install-Module posh-git -Scope CurrentUser -Force
Enter fullscreen mode Exit fullscreen mode
  1. Add posh-git to PowerShell profiles by either running Add-PoshGitToProfile -AllHosts or add it to the profiles file located at: C:\Program Files\PowerShell\7\Microsoft.PowerShell_profile.ps1 (Create the file if it doesn't exist).

References:

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (1)

Collapse
 
eddorneles profile image
eddorneles

Thank you very much for the help!

It worked easily!

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay