Created
April 26, 2015 15:20
-
-
Save bcdady/e3ac78cd27e4dcd82699 to your computer and use it in GitHub Desktop.
Import posh-git module to an existing console (non Git Shell)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Starting a new PowerShell (PS) console on a Windows OS instance that has GitHub client for Windows installed ... | |
# Find the local instance of git.exe; it's an 'external' dependency for posh-git | |
Get-ChildItem -Path $env:LocalAppData\GitHub\ -Filter git.exe -Recurse | |
# Should return at least 1 instance of git.exe | |
# Select one and add an alias to it | |
# I choose the one in \bin\ for example: | |
New-Alias -Name git -Value $env:LOCALAPPDATA\GitHub\PortableGit_c2ba306e536fdf878271f7fe636a147ff37326ad\bin\git.exe | |
# I then use tab auto-complete to find the latest posh-git module, as included with the GitHub client for Windows | |
Import-Module $env:LocalAppData\GitHub\PoshGit_869d4c5159797755bc04749db47b166136e59132\posh-git.psm1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Any idea how to have "GitHub client for Windows installed" ? Without installing GitHub Desktop. Thanks.