Chapters ▾ 2nd Edition

A1.6 Appendix A: Git em Outros Ambientes - Git in Powershell

Git in Powershell

The standard 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. A package called Posh-Git ( provides powerful tab-completion facilities, as well as an enhanced prompt to help you stay on top of your repository status. It looks like this:

Powershell with Posh-git.
Figure 164. Powershell with Posh-git.

Just download a Posh-Git release from (, and uncompress it to the WindowsPowershell directory. Then open a Powershell prompt as the administrator, and do this:

> Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Confirm
> cd ~\Documents\WindowsPowerShell\posh-git
> .\install.ps1

This will add the proper line to your profile.ps1 file, and posh-git will be active the next time you open your prompt.