|
3 | 3 |
|
4 | 4 | (((powershell)))(((tab completion, powershell)))(((shell prompts, powershell)))
|
5 | 5 | (((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. |
7 | 8 | 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.
|
8 | 9 | It looks like this:
|
9 | 10 |
|
@@ -33,7 +34,15 @@ More information about the requirements: (https://docs.microsoft.com/en-us/power
|
33 | 34 | > Install-Module Posh-Git -Scope AllUsers
|
34 | 35 | -----
|
35 | 36 | 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. |
37 | 46 |
|
38 | 47 | ===== Update PowerShell Prompt
|
39 | 48 | 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