You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If it is not available, you can download it at address https://pypi.python.org/pypi/fastimport/.
56
57
57
58
In the second case (on Windows), `bzr-fastimport` is automatically installed with the standalone version and the default installation (let all the checkboxes checked).
Copy file name to clipboardExpand all lines: book/A-git-in-other-environments/sections/powershell.asc
+17-8Lines changed: 17 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,9 @@ It looks like this:
12
12
image::images/posh-git.png[PowerShell with Posh-git.]
13
13
14
14
==== Installation
15
+
15
16
===== Prerequisites (Windows only)
17
+
16
18
Before you're able to run PowerShell scripts on your machine, you need to set your local ExecutionPolicy to RemoteSigned (Basically anything except Undefined and Restricted).
17
19
If you choose AllSigned instead of RemoteSigned, also local scripts (your own) need to be digitally signed in order to be executed.
18
20
With RemoteSigned, only Scripts having the "ZoneIdentifier" set to Internet (were downloaded from the web) need to be signed, others not.
@@ -24,19 +26,22 @@ More about PowerShell Scopes: https://docs.microsoft.com/en-us/powershell/module
24
26
More about PowerShell ExecutionPolicy: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy[]
> Install-Module posh-git -Scope CurrentUser -AllowPrerelease -Force # Newer beta version with PowerShell Core support
39
-
-----
43
+
----
44
+
40
45
If you want to install posh-git for all users, use "-Scope AllUsers" instead and execute the command from an elevated PowerShell console.
41
46
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:
42
47
@@ -49,25 +54,29 @@ Then you can go back and try again.
49
54
This happens, because the modules that ship with Windows PowerShell are signed with a different publishment certificate.
50
55
51
56
===== Update PowerShell Prompt
57
+
52
58
To include git information in your prompt, the posh-git module needs to be imported.
53
59
To have posh-git imported every time PowerShell starts, execute the Add-PoshGitToProfile command which will add the import statement into you $profile script.
54
60
This script is executed everytime you open a new PowerShell console.
55
61
Keep in mind, that there are multiple $profile scripts.
56
62
E. g. one for the console and a separate one for the ISE.
63
+
57
64
[source,powershell]
58
-
-----
65
+
----
59
66
> Import-Module posh-git
60
67
> Add-PoshGitToProfile -AllHosts
61
-
-----
68
+
----
62
69
63
70
===== From Source
71
+
64
72
Just download a posh-git release from (https://github.com/dahlbyk/posh-git[]), and uncompress it.
65
73
Then import the module using the full path to the posh-git.psd1 file:
This will add the proper line to your `profile.ps1` file, and posh-git will be active the next time you open PowerShell.
73
82
For a description of the Git status summary information displayed in the prompt see: https://github.com/dahlbyk/posh-git/blob/master/README.md#git-status-summary-information[]
0 commit comments