Jump to content
  • We are looking for staff for the Wiki area!
    If interested please
    click here and select "Documentation Team"

  • Installing Posh-Git for a superior Git Command line experience


    antz

    Posh Git uses a powershell session to host git and allows for a much better git experience on windows.

    As an example, my git prompt displays as follows:

    C:\Users\Keith\GitHub\posh-git [main ≡ +0 ~1 -0 | +0 ~1 -0 !]>

    First part is the current path, master is the branch that i'm on.

    Green shows files are added, modified or removed in the current commit,
    Red shows files are added, modified or removed which are not part of the current commit,
     

    How to install Posh-Git

    1) Open powershell

    2) Enter the following:

    Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Confirm


    Answer Yes to any prompts that appear.

    3) Enter the following to install NuGet (if you haven't already):

    PowerShellGet\Install-Module NuGet -Scope CurrentUser -Force

    4) Enter the following to install Posh-Git:

    PowerShellGet\Install-Module posh-git -Scope CurrentUser -Force

    5) Import Posh-Git into powershell:

    Import-Module posh-git

    6) Set powershell to import Posh-Git by default:

    Add-PoshGitToProfile -AllHosts

    That's it, navigate to a folder containing a git repo to discover the magic.

    Original Articles:
    Dahlbyk - Posh-Git
    Computering For Geeks - Posh-Git


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use