# 使用 Homebrew, chocolatey, scoop, winget 安装 gitversion

查看 gitversion 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:gitversion
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install gitversion
```

  证据: local Homebrew formula metadata

### Windows

- Chocolatey (92%):

```sh
choco install GitVersion
```

  证据: Chocolatey community package catalog: GitVersion from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='6.928','obs-virtualcam'

- Scoop (92%):

```sh
scoop install main/gitversion
```

  证据: Scoop official bucket manifest trees: bucket/gitversion.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id GitTools.GitVersion -e
```

  证据: Windows Package Manager source index: GitTools.GitVersion from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:gitversion
- **软件包管理器:** Homebrew
- **版本:** 6.8.2
- **来源摘要:** Easy semantic versioning for projects using Git
- **主页:** <https://gitversion.net/docs/>
- **仓库:** <https://github.com/GitTools/GitVersion>
- **最后更新:** 2026-07-10T09:37:05Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- gitversion (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 6.8.2
## 项目历史与用法

GitVersion is a release-management utility that derives Semantic Versioning values from a Git repository. It turns branch names, tags, merge history, and configuration into version variables that can be consumed by command-line builds, MSBuild, CI tasks, Docker workflows, and libraries.

### 项目历史

The GitTools/GitVersion repository dates to 2013 and grew around a narrow problem in Git-based release automation: projects wanted SemVer numbers without hand-editing version files on every build. Its official README describes the core idea as looking at Git history and working out the Semantic Version of the commit being built.

The project evolved from a .NET-oriented CLI into a family of build integrations. The official README lists GitHub releases, Chocolatey, NuGet packages for the .NET tool and MSBuild task, Homebrew, Winget, Azure Pipelines, GitHub Actions, and Docker artifacts, reflecting a tool meant to sit inside many build systems rather than one local shell.

### 采用历史

GitVersion became significant in the .NET and CI ecosystem because it encoded common GitFlow and trunk-style versioning rules into a repeatable build step. Its documentation emphasizes use in command-line and continuous-integration contexts, where build servers need the same version calculation as developer machines.

Package-manager metadata in this batch shows GitVersion distributed through Homebrew, Chocolatey, Scoop, and Winget. Combined with the official NuGet, Azure Pipelines, GitHub Actions, and Docker artifacts, that spread shows adoption across local developer tooling and hosted build infrastructure.

### 使用方式

Practitioners use GitVersion to generate version variables during builds, then feed those values into package metadata, assembly attributes, container tags, release names, or CI outputs. The common workflow is to run the CLI or an integration from a checked-out Git repository and let GitVersion infer the SemVer value from repository state.

Teams also add GitVersion.yml or GitVersion.yaml files when the default branching and incrementing rules need to match their release process. That configuration keeps version policy near source code while avoiding custom scripts for every pipeline.

### 为什么软件包爱好者会关心

GitVersion matters to package maintainers because it makes version numbers reproducible from source history. That is attractive for automated package builds, where the package version should be explainable from tags and commits rather than a mutable build-server counter.

It is also a good example of a CLI that became a packaging surface in its own right: the same versioning engine is exposed as a standalone executable, a .NET tool, an MSBuild task, CI marketplace integrations, and container images.

### 时间线

- 2013: The GitTools/GitVersion repository is created on GitHub.
- 2015: GitVersion 3.3.0 appears in the GitHub releases feed.
- 2020: GitVersion 5.x tags show the tool's continued shift toward broad build-system integration.
- 2026: Repository activity and packaged artifacts show ongoing maintenance.

### Related projects

- Semantic Versioning supplies the version-numbering convention GitVersion calculates.
- GitFlow-style branch models influenced many of GitVersion's documented branch and incrementing rules.
- GitHub Actions, Azure Pipelines, MSBuild, NuGet, Docker, Homebrew, Chocolatey, Scoop, and Winget are distribution or integration surfaces named by the project and package metadata.

### 来源

- <https://api.github.com/repos/GitTools/GitVersion>
- <https://github.com/GitTools/GitVersion>
- <https://gitversion.net/docs>
- <https://gitversion.net/docs/learn/why>
- <https://gitversion.net/docs/usage>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: GitVersion.yml, GitVersion.yaml, .GitVersion.yml, .GitVersion.yaml
- Windows: GitVersion.yml, GitVersion.yaml, .GitVersion.yml, .GitVersion.yaml
## 其他软件包管理器记录

- Chocolatey - GitVersion: normalized package name match | Chocolatey community package catalog: GitVersion from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='6.928','obs-virtualcam'
- Scoop - main/gitversion: normalized package name match | Scoop official bucket manifest trees: bucket/gitversion.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - GitTools.GitVersion: normalized package name match | Windows Package Manager source index: GitTools.GitVersion from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

View the package source record on GitHub. [combined/gitversion.yml](https://github.com/mxcl/pkgdb/blob/main/combined/gitversion.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
