Skip to content

Commit ef8abe0

Browse files
committed
posh-git
1 parent 1155d68 commit ef8abe0

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

en/book/10-git-in-other-environments/chapter10.asc

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,22 +198,28 @@ A package called Posh-Git (TODO: URL) provides powerful tab-completion facilitie
198198

199199
[[git_posh]]
200200
.Powershell with Posh-git.
201-
image::images/git-posh.png[Powershell with Posh-git.]
201+
image::images/posh-git.png[Powershell with Posh-git.]
202202

203203
If you've installed GitHub for Windows, Posh-Git is included by default, and all you have to do is add these lines to your `profile.ps1` (which is usually located in `C:\Users\<username>\Documents\WindowsPowerShell`):
204204

205205
[source,powershell]
206206
-----
207-
# TODO
207+
. (Resolve-Path "$env:LOCALAPPDATA\GitHub\shell.ps1")
208+
. $env:github_posh_git\profile.example.ps1
208209
-----
209210

210-
If you're not a GitHub for Windows user, just download a Posh-Git release from (TODO: URL), uncompress it to the `WindowsPowershell` directory, and add this to your `profile.ps1`:
211+
If you're not a GitHub for Windows user, just download a Posh-Git release from (https://github.com/dahlbyk/posh-git[]), and uncompress it to the `WindowsPowershell` directory.
212+
Then open a Powershell prompt as the administrator, and do this:
211213

212214
[source,powershell]
213215
-----
214-
# TODO
216+
> Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Confirm
217+
> cd ~\Documents\WindowsPowerShell\posh-git
218+
> .\install.ps1
215219
-----
216220

221+
This will add the proper line to your `profile.ps1` file, and posh-git will be active the next time you open your prompt.
222+
217223
=== Git in Your Application
218224

219225
If your application is for developers, chances are good that it could benefit from integration with source control.

en/book/images/posh-git.png

9.73 KB
Loading

0 commit comments

Comments
 (0)