Skip to content

Instantly share code, notes, and snippets.

@milas
Last active December 22, 2015 16:09
Show Gist options
  • Save milas/6497785 to your computer and use it in GitHub Desktop.
Save milas/6497785 to your computer and use it in GitHub Desktop.
Add useful git extensions courtesy of the GitHub app to all your PowerShell terminals

Assuming you have the GitHub for Windows app installed, add the following to your primary PowerShell profile to use the GitHub app installation of Git, posh-git, and SSH key manager in all console windows without installing a duplicate copies.

The default PowerShell profile is typically located at $env:profile\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1, but you can also run $profile from a PowerShell window to find the path of your active profile.

. (Resolve-Path "$env:LOCALAPPDATA\GitHub\shell.ps1")
if (test-path env:github_posh_git) {
. $env:github_posh_git\profile.example.ps1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment