6

I just installed GitHub for windows and for convenience I added entries for the powershell in the context menu in Windows Explorer. The registry commands are:

C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe -NoExit 
C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit -Command Set-Location -LiteralPath '%L'

As suggested in shell.ps1 I added ". (Resolve-Path "$env:LOCALAPPDATA\GitHub\shell.ps1")" to my profile.ps1 to get poshgit and the rest setup within my powershell environment. It is not completely working though. I can see that shell.ps1 was executed (when running "$env:github_posh_git" I see the right value appearing) but when I navigate to a git repo I do not see the enhanced prompt.

What am I missing?

PS: The only version of Powershell I have came with GitHub for windows and even though the folder says "1.0" running

 $psversiontable.psversion

returned

Major  Minor  Build  Revision
-----  -----  -----  --------
2      0      -1     -1
3
  • Ignore the name of the folder. It still says v1.0 for PowerShell v3 and the v4 preview. Commented Aug 13, 2013 at 19:47
  • Where have you placed your profile.ps1 file? It should be in $Home\Documents\WindowsPowerShell. Commented Aug 13, 2013 at 19:48
  • @KeithHill The profile.ps1 file is where you mentioned. Commented Aug 14, 2013 at 8:21

1 Answer 1

4

I got an answer from GitHub support:

The enhanced prompt is provided by posh-git [1], and it isn't added when you run the line in shell.ps1. However, it's easy enough to install.

Just cd to C:\Users\Username\AppData\GitHub\PoshGit_* and run the install.ps1 script from PowerShell. It will add it to your PowerShell $profile automatically.

Sign up to request clarification or add additional context in comments.

1 Comment

Depending on network config, you may have to cd to "C:\Users\Username\AppData\local\GitHub\PoshGit_*"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.