PageSourceSearch

https://ohmyposh.dev/assets/js/62d407f3.faf549c5.js

js ohmyposh.dev collected 2026-10-02 04:44:40 UTC 3,048 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2069],{2465(e,i,t){t.r(i),t.d(i,{assets:()=>c,contentTitle:()=>l,default:()=>p,frontMatter:()=>a,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"segments/cli/gitversion","title":"GitVersion","description":"What","source":"@site/docs/segments/cli/gitversion.mdx","sourceDirName":"segments/cli","slug":"/segments/cli/gitversion","permalink":"/docs/segments/cli/gitversion","draft":false,"unlisted":false,"editUrl":"https://github.com/jandedobbeleer/oh-my-posh/edit/main/website/docs/segments/cli/gitversion.mdx","tags":[],"version":"current","frontMatter":{"id":"gitversion","title":"GitVersion","sidebar_label":"GitVersion"},"sidebar":"docs","previous":{"title":"Flutter","permalink":"/docs/segments/cli/flutter"},"next":{"title":"Gradle","permalink":"/docs/segments/cli/gradle"}}');var s=t(4848),r=t(8453),o=t(6674);const a={id:"gitversion",title:"GitVersion",sidebar_label:"GitVersion"},l=void 0,c={},d=[{value:"What",id:"what",level:2},{value:"Sample Configuration",id:"sample-configuration",level:2},{value:"Template (info)",id:"template-info",level:2},{value:"Properties",id:"properties",level:3}];function h(e){const i={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.h2,{id:"what",children:"What"}),"\n",(0,s.jsxs)(i.p,{children:["Display the ",(0,s.jsx)(i.a,{href:"https://github.com/GitTools/GitVersion",children:"GitVersion"})," version.\nWe ",(0,s.jsx)(i.em,{children:"strongly"})," recommend using ",(0,s.jsx)(i.a,{href:"http://chocolatey.org/packages/GitVersion.Portable",children:"GitVersion Portable"})," for this."]}),"\n",(0,s.jsx)(i.admonition,{type:"caution",children:(0,s.jsx)(i.p,{children:"The GitVersion CLI can be a bit slow, causing the prompt to feel slow. This is why we cache\nthe value for 30 minutes by default."})}),"\n",(0,s.jsx)(i.h2,{id:"sample-configuration",children:"Sample Configuration"}),"\n","\n",(0,s.jsx)(o.A,{data:{type:"gitversion",style:"powerline",powerline_symbol:"\ue0b0",foreground:"#ffffff",background:"#3a579b",template:" \uf1d2 {{ .MajorMinorPatch }} "}}),"\n",(0,s.jsxs)(i.h2,{id:"template-info",children:["Template (",(0,s.jsx)(i.a,{href:"/docs/configuration/templates",children:"info"}),")"]}),"\n",(0,s.jsx)(i.admonition,{title:"default template",type:"note",children:(0,s.jsx)(i.pre,{children:(0,s.jsx)(i.code,{className:"language-template",children:"{{ .MajorMinorPatch }}\n"})})}),"\n",(0,s.jsx)(i.h3,{id:"properties",children:"Properties"}),"\n",(0,s.jsxs)(i.p,{children:["You can leverage all variables from the ",(0,s.jsx)(i.a,{href:"https://github.com/GitTools/GitVersion",children:"GitVersion"})," CLI. Have a look at their ",(0,s.jsx)(i.a,{href:"https://gitversion.net/docs/reference/variables",children:"documentation"})," for more information."]})]})}function p(e={}){const{wrapper:i}={...(0,r.R)(),...e.components};return i?(0,s.jsx)(i,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.