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
Copy file name to clipboardExpand all lines: book/01-introduction/sections/command-line.asc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,5 +7,5 @@ For one, the command line is the only place you can run _all_ Git commands -- mo
7
7
If you know how to run the command-line version, you can probably also figure out how to run the GUI version, while the opposite is not necessarily true.
8
8
Also, while your choice of graphical client is a matter of personal taste, _all_ users will have the command-line tools installed and available.
9
9
10
-
So we will expect you to know how to open Terminal in Mac or Command Prompt or Powershell in Windows.
10
+
So we will expect you to know how to open Terminal in Mac or Command Prompt or PowerShell in Windows.
11
11
If you don't know what we're talking about here, you may need to stop and research that quickly so that you can follow the rest of the examples and descriptions in this book.
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.
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
7
This also works if you're running PowerShell on a non-Windows platform like Debian.
8
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.
9
9
It looks like this:
10
10
11
-
.Powershell with Posh-git.
12
-
image::images/posh-git.png[Powershell with Posh-git.]
11
+
.PowerShell with Posh-git.
12
+
image::images/posh-git.png[PowerShell with Posh-git.]
13
13
14
14
==== Installation
15
15
===== Prerequisites (Windows only)
@@ -45,7 +45,7 @@ If the second command fails with an error like `Module 'PowerShellGet' was not i
45
45
----
46
46
47
47
Then you can go back and try again.
48
-
This happens, because the modules that ship with Windows Powershell are signed with a different publishment certificate.
48
+
This happens, because the modules that ship with Windows PowerShell are signed with a different publishment certificate.
49
49
50
50
===== Update PowerShell Prompt
51
51
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.
@@ -57,8 +57,8 @@ Keep in mind, that there are multiple $profile scripts. E. g. one for the consol
57
57
-----
58
58
59
59
===== From Source
60
-
Just download a Posh-Git release from (https://github.com/dahlbyk/posh-git[]), and uncompress it to the `WindowsPowershell` directory.
61
-
Then open a Powershell prompt as an administrator, and do this:
60
+
Just download a Posh-Git release from (https://github.com/dahlbyk/posh-git[]), and uncompress it to the `WindowsPowerShell` directory.
61
+
Then open a PowerShell prompt as an administrator, and do this:
62
62
[source,powershell]
63
63
-----
64
64
> cd ~\Documents\WindowsPowerShell\Module\posh-git
0 commit comments