Skip to content

Commit 083fdf6

Browse files
author
Klaus Frank
authored
Implementing feedback
Split long lines into separate ones and rephrase some things as suggested by contributor.
1 parent 5393e2b commit 083fdf6

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

book/A-git-in-other-environments/sections/powershell.asc

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
(((powershell)))(((tab completion, powershell)))(((shell prompts, powershell)))
55
(((posh-git)))
6-
The legacy command-line terminal on Windows (`cmd.exe`) isn't really capable of a customized Git experience, but if you're using Powershell, you're in luck. This also works if you're running PowerShell on any other platform than Windows like Debian.
6+
The legacy command-line terminal on Windows (`cmd.exe`) isn't really capable of a customized Git experience, but if you're using Powershell, you're in luck.
7+
This also works if you're running PowerShell on a non-Windows platform like Debian.
78
A package called Posh-Git (https://github.com/dahlbyk/posh-git[]) provides powerful tab-completion facilities, as well as an enhanced prompt to help you stay on top of your repository status.
89
It looks like this:
910

@@ -33,7 +34,15 @@ More information about the requirements: (https://docs.microsoft.com/en-us/power
3334
> Install-Module Posh-Git -Scope AllUsers
3435
-----
3536
If you want to install Posh-Git only for the current user and not globally, use "-Scope CurrentUser" instead.
36-
If the 2nd command fails with the message `Update-Module : Module 'PowerShellGet' was not installed by using Install-Module, so it cannot be updated.` You need to run: `Install-Module PowerShellGet -Force -SkipPublisherCheck` instead. This happens, because the modules that ship with Windows Powershell are signed with a different publishment certificate.
37+
If the second command fails with an error like `Module 'PowerShellGet' was not installed by using Install-Module`, you'll need to run another command first:
38+
39+
[source,powershell]
40+
----
41+
> Install-Module PowerShellGet -Force -SkipPublisherCheck
42+
----
43+
44+
Then you can go back and try again.
45+
This happens, because the modules that ship with Windows Powershell are signed with a different publishment certificate.
3746

3847
===== Update PowerShell Prompt
3948
To include git information in your prompt, posh-git needs to be imported. To do this automatically, include the import statement into you $profile script. This script is executed everytime you open a new PowerShell prompt.

0 commit comments

Comments
 (0)