Back to Oh My Posh

GitVersion

website/docs/segments/cli/gitversion.mdx

29.12.01.0 KB
Original Source

What

Display the GitVersion version. We strongly recommend using GitVersion Portable for this.

:::caution The GitVersion CLI can be a bit slow, causing the prompt to feel slow. This is why we cache the value for 30 minutes by default. :::

Sample Configuration

import Config from '@site/src/components/Config.js';

<Config data={{ "type": "gitversion", "style": "powerline", "powerline_symbol": "\uE0B0", "foreground": "#ffffff", "background": "#3a579b", "template": " \uF1D2 {{ .MajorMinorPatch }} " }}/>

Template (info)

:::note default template

template
{{ .MajorMinorPatch }}

:::

Properties

You can leverage all variables from the GitVersion CLI. Have a look at their documentation for more information.