In order to get bash like git autocomplete in Powershell, install the posh-git package.
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 toRemoteSigned
orUnrestricted
.In PowerShell execute:
PowerShellGet\Install-Module posh-git -Scope CurrentUser -Force
- 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:
Top comments (1)
Thank you very much for the help!
It worked easily!