A Powershell module that improves on the git command line experience with colorized output with icons as well as an easier branch selection experience.
PowerColorGit is a Powershell module that improves on the git command line experience with simplified and colorized output and simplified branch selection. For the module to work, you must first install Terminal-Icons and setup the Nerd Fonts
The module provides enhancements to the git status git branch and git checkout commands.
For example, this is how the standard output of git status can look like:
With PowerColorGit you instead get this output:
PowerColorGit will also fallback to default behaviour when an option or command is not specifically implemented in PowerColorGit, so you can use commands like PowerColorGit clone, PowerColorGit push or powercolorgit status --short even though nothing is implemented in PowerColorGit for these.
To install the module from the PowerShell Gallery:
Install-Module -Name PowerColorGit -Repository PSGallery
Import-Module PowerColorGit
PowerColorGit status
PowerColorGit branch
PowerColorGit branch -a
PowerColorGit checkout partialbranchname
PowerColorGit status
In this example, the currently selected branch is feature/add_support_for_branch_picker as indicated with the green color and checkmark.
Please note that the HEAD branch will by default not be displayed in PowerColorGit. You can change this in the configuration.
In this example, the only remotely available branch is main, all others are local only, as indicated with the icons.
PowerColorGit branch -a
With PowerColorGit you can checkout a branch by providing the full or partial name of a branch.
If a single match is found based on the name or partial name you provided, you will be switched to that branch.
If multiple branches were found you will be shown a menu to select which branch you want to switch to.
You can also completely omit giving a branch name. This will show a menu of all branches except the one you are currently on.
The HEAD branch will by default not be displayed in PowerColorGit. You can change this in the configuration.
By default, if there is a remote tracking branch, PowerColorGit checkout will do a git pull after checking out a branch. You can change this setting in the configuration.
In the example below three branches matching the partial branch name feature was found, all of them are local only branches as indicated with the icons:
PowerColorGit checkout feature
In the file config.json you will find some configuration options for PowerColorGit.
Warning. Do not alias to git since PowerColorGit uses the git command internally and this would cause the module to call itself.
Set-Alias -Name pcg -Value PowerColorGit -Option AllScope