Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dahlbyk/posh-git
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b12bdf8fb3c4eed9dc1732e066ce64124808cf52
Choose a base ref
..
head repository: dahlbyk/posh-git
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0ef0a84546e67425a20d97f3b5f5ab35fa427b90
Choose a head ref
Showing with 19 additions and 4 deletions.
  1. +6 −1 .vscode/settings.json
  2. +13 −3 README.md
7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -4,6 +4,11 @@
"markdownlint.config": {
"MD013": false,
"MD024": false,
"MD029": false
"MD029": false,
"MD033": {
"allowed_elements": [ "kbd" ]
},
"MD034": false,
"MD038": false
}
}
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -91,7 +91,7 @@ Before installing posh-git make sure the following prerequisites have been met.
If not, install Git from [https://git-scm.com](https://git-scm.com).
If you have Git installed, make sure the path to git is in your PATH environment variable.

### Installing posh-git
### Installing posh-git via PowerShellGet

posh-git is available on the [PowerShell Gallery][psgallery-v1] and can be installed using the PowerShellGet module.

@@ -115,7 +115,7 @@ posh-git is available on the [PowerShell Gallery][psgallery-v1] and can be insta
PowerShellGet\Update-Module posh-git
```

### Extra step for Linux and macOS users
#### Extra step for Linux and macOS users

The version of `PSReadLine` (1.2) that ships with PowerShell Core 6.0 has known issues that cause problems with the
prompt function that posh-git uses. Fortunately, there is a beta of PSReadLine 2.0.0 that fixes these problems.
@@ -130,6 +130,16 @@ If it less than 2.0.0, follow this procedure.

2. Restart `pwsh` and verify you have at least the `2.0.0` version of PSReadLine by executing: `Get-Module PSReadLine`.

### Installing posh-git via Chocolatey

If you prefer to manage posh-git as a Windows package, you can use [Chocolatey](https://chocolatey.org) to install posh-git.
If you don't have Chocolatey, you can install it from the [Chocolately Install page](https://chocolatey.org/install).
With Chocolatey installed, execute the following command to install posh-git:

```powershell
choco install poshgit
```

## Using posh-git

After you have installed posh-git, you need to configure your PowerShell session to use the posh-git module.
@@ -238,7 +248,7 @@ For example, a status of `[master ≡ +0 ~2 -1 | +1 ~1 -0]` corresponds to the f
## Customization variables

posh-git adds variables to your session to let you customize it, including `$GitPromptSettings`, `$GitTabSettings`, and `$TortoiseGitSettings`.
For an example of how to configure your PowerShell profile script to import the posh-git module and create a custom prompt function that displays git status info, see the [Customizing Your PowerShell Prompt](#step-3-optional-customize-your-powershell-prompt) section below.
For an example of how to configure your PowerShell profile script to import the posh-git module and create a custom prompt function that displays git status info, see the [Customizing Your PowerShell Prompt](#customizing-the-posh-git-prompt) section below.

Note on performance: Displaying file status in the git prompt for a very large repo can be prohibitively slow.
Rather than turn off file status entirely (`$GitPromptSettings.EnableFileStatus = $false`), you can disable it on a repo-by-repo basis by adding individual repository paths to `$GitPromptSettings.RepositoriesInWhichToDisableFileStatus`.