Helping you solve those tough coding problems!

posh-git: the only GIT command line tool I use posh-git: the only GIT command line tool I use

Published on Feb 13, 2019 by Jamie Munro

You've installed GitHub on Windows, but the UI sucks. So you want to use command line, but you want to easily know the state your changes are in at any given moment.

The best command line tool that I use is posh-git. I use Windows for my local development which means I am using the Powershell version of posh-git.




Installing posh-git



To install posh-git for Windows Powershell. With the Powershell command line, execute the following command:
PowerShellGet\Install-Module posh-git -Scope CurrentUser

If you have never installed a module before with Powershell, you may be asked to install the NuGet package as well.

After installing posh-git you will want to add it to your Powershell profile so it will load each time you start the Powershell tool. Run the following command:
Add-PoshGitToProfile

With posh-git installed, you will get some very handy color coding and helpful tab commands to help auto completing your commands. For example you can type: git st and it will auto complete to git stash. Extremely useful, time saving stuff.

The color coding is great as well:


  • Blue - Your local copy is the same as the remote branch

  • Green - Your local copy is ahead of the remote branch (you have something to commit)

  • Red - Your local copy is behind the remote branch (you have something to pull)

  • Yellow - Your local copy and the remote branch have a conflict that needs resolving



There are also a variety of numbers telling you about added, modified, deleted files, etc. All-in-all a great tool for every day GIT users like myself.

Be sure you have also installed Git for Windows so git commands are available in the Powershell console.

Tags: Github | git | posh-git

My Books