# Install git with Homebrew, apk, chocolatey, apt, dnf, MacPorts, Nix, pacman, scoop, winget, zypper

Distributed revision control system. Version 2.55.0 via Homebrew; verified 2026-06-29.

## Install

```sh
sudo av install brew:git
```

## Agent safety answer

git can read repository history and mutate source-control state used by agents and humans.

- **Credential access:** Reads credential helpers, remotes, config, signed keys, and repository-local secret history.
- **Remote mutation:** Can push commits, tags, branches, and force updates to remote repositories.
- **Publish/artifact risk:** Can publish source changes and release tags that downstream systems consume.
- **Recommended control:** Gate pushes, tag creation, credential fill, and remote rewrites.
- **Agent-use guidance:** Allow diff/status/log reads; require approval for pushes, credential-helper reads, and destructive history changes.

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install git
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install git
```

  Evidence: MacPorts ports tree: devel/git/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add git
```

  Evidence: Alpine Linux edge package indexes: git from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install git
```

  Evidence: Debian stable package indexes: git from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install git
```

  Evidence: Fedora Rawhide package metadata: git from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#git
```

  Evidence: nixpkgs package indexes: pkgs/by-name/gi/git/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S git
```

  Evidence: Arch Linux sync databases: git from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install git
```

  Evidence: openSUSE Tumbleweed package metadata: git from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

### Windows

- Chocolatey (92%):

```sh
choco install git
```

  Evidence: Chocolatey community package catalog: git from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','gawk'

- Scoop (92%):

```sh
scoop install main/git
```

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

- winget (92%):

```sh
winget install --id DuckStudio.ChineseGit -e
```

  Evidence: Windows Package Manager source index: DuckStudio.ChineseGit from https://cdn.winget.microsoft.com/cache/source.msix

## Package facts

- **Package key:** brew:git
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/git>
- **Version:** 2.55.0
- **Source summary:** Distributed revision control system
- **Homepage:** <https://git-scm.com>
- **Repository:** <https://git.kernel.org/pub/scm/git/git.git>
- **Upstream docs:** <https://git-scm.com/doc>
- **License:** GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND BSD-3-Clause AND MIT
- **Source archive:** <https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.55.0.tar.xz>
- **Last updated:** 2026-06-29T20:54:53Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- git (cli)
- git-cvsserver (cli)
- git-receive-pack (cli)
- git-shell (cli)
- git-upload-archive (cli)
- git-upload-pack (cli)
- scalar (cli)
- git (alias)
- git-cvsserver (alias)
- git-receive-pack (alias)
- git-shell (alias)
- git-upload-archive (alias)
- git-upload-pack (alias)
- scalar (alias)

## Dependencies

- gettext
- pcre2

## Build dependencies

- gettext
- pkgconf

## Uses from macOS

- curl
- expat

## Install behavior

- Post-install hook: not defined
- Caveats: The Tcl/Tk GUIs (e.g. gitk, git-gui) are now in the `git-gui` formula. Subversion interoperability (git-svn) is now in the `git-svn` formula.
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 2.55.0
- Package-manager updated: 2026-06-29
- Local data: ok
- Upstream repository: https://git-scm.com
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

Git is the distributed version-control system created for Linux kernel development and later generalized into the default source-control substrate for much of software development. Its command-line interface, repository format, protocol family, and ecosystem of hosting services define how many projects exchange code.

### Project history

Git began in 2005 after the Linux kernel community lost access to the proprietary BitKeeper workflow it had been using. Linus Torvalds wrote the original implementation to support Linux-scale development, emphasizing speed, integrity, distributed operation, and cheap branching.

The design departed from centralized version-control systems by making every clone a full repository with local history and branch operations. That choice made offline work, fork-based development, and patch exchange natural rather than exceptional.

After its Linux origin, Git evolved into a broadly portable tool with a large manual set, porcelain commands for everyday work, and plumbing commands for scripts and higher-level tools. The kernel.org repository remains the canonical upstream source location, while git-scm.com provides the public documentation hub.

### Adoption history

Git's adoption accelerated with distributed open source development and the rise of Git hosting services such as GitHub, GitLab, and related forges. The official Git site characterizes the core project as a command-line tool surrounded by hosting services, graphical clients, editor integrations, and other command-line helpers.

By the early 2010s, Git had moved from a Linux-kernel tool into the common denominator for open source collaboration, commercial software teams, CI systems, package ecosystems, and code review platforms. Its repository model also became the foundation for workflows outside source code, including documentation and data-adjacent projects.

### How it is used

Practitioners use Git to initialize or clone repositories, stage and commit changes, branch and merge work, inspect history, exchange commits through remotes, and recover earlier states. Its local-first model makes common commands fast because most history and metadata are on the developer's machine.

Teams layer policy on top of Git through protected branches, pull requests, signed commits, release tags, submodules, worktrees, hooks, and CI triggers. The same executable serves both interactive daily work and automation in release scripts, package recipes, deployment systems, and source archives.

### Why package nerds care

Git is one of the central dependencies of package-manager culture. Formulae, ports, distro source packages, language registries, and build systems routinely fetch from Git repositories, pin commits or tags, generate source archives, and use Git metadata to derive versions.

Its significance also comes from its stability as an interchange format. Even tools that wrap Git, avoid the Git CLI, or store files elsewhere usually need to speak in Git concepts: commits, refs, remotes, branches, tags, diffs, and patches.

### Timeline

- 2005: Git was created for Linux kernel development after the BitKeeper transition.
- 2005: Early Git releases established the distributed repository model.
- 2010s: Hosted Git forges and pull-request workflows made Git the dominant version-control system for many developer communities.
- 2020s: Git remained a base dependency for package managers, CI, source archives, and developer tools.

### Related projects

- Linux kernel development drove Git's original requirements.
- GitHub, GitLab, Gitea, Forgejo, and other forges build hosted collaboration around Git repositories.
- Git LFS and Git Xet extend Git workflows for large-file storage.
- Scalar, included with Git packages, targets very large repository workflows.

### Sources

- <https://git-scm.com/about>
- <https://git-scm.com/book/en/v2/Getting-Started-A-Short-History-of-Git>
- <https://git-scm.com/docs>
- <https://git-scm.com/docs/git>
- <https://git.kernel.org/pub/scm/git/git.git>


## Security Notes

doc example: broad file and network tool.

- **Geiger risk:** blue / high
- doc example: broad file and network tool
- **Approval gate rules:** 6


## 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.


## Credential files

- Unix: ~/.git-credentials
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** git
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Debian apt - git - 1:2.47.3-0+deb13u1: normalized package name match | Debian stable package indexes: git from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | fast, scalable, distributed revision control system | https://git-scm.com/
- Debian apt - git-all - 1:2.47.3-0+deb13u1: normalized package name match | Debian stable package indexes: git-all from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | fast, scalable, distributed revision control system (all subpackages) | https://git-scm.com/
- Debian apt - git-cvs - 1:2.47.3-0+deb13u1: normalized package name match | Debian stable package indexes: git-cvs from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | fast, scalable, distributed revision control system (cvs interoperability) | https://git-scm.com/
- Debian apt - git-doc - 1:2.47.3-0+deb13u1: normalized package name match | Debian stable package indexes: git-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | fast, scalable, distributed revision control system (documentation) | https://git-scm.com/
- Debian apt - git-email - 1:2.47.3-0+deb13u1: normalized package name match | Debian stable package indexes: git-email from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | fast, scalable, distributed revision control system (email add-on) | https://git-scm.com/
- Debian apt - git-gui - 1:2.47.3-0+deb13u1: normalized package name match | Debian stable package indexes: git-gui from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | fast, scalable, distributed revision control system (GUI) | https://git-scm.com/
- Debian apt - git-man - 1:2.47.3-0+deb13u1: normalized package name match | Debian stable package indexes: git-man from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | fast, scalable, distributed revision control system (manual pages) | https://git-scm.com/
- Debian apt - git-mediawiki - 1:2.47.3-0+deb13u1: normalized package name match | Debian stable package indexes: git-mediawiki from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | fast, scalable, distributed revision control system (MediaWiki remote helper) | https://git-scm.com/
- Debian apt - git-svn - 1:2.47.3-0+deb13u1: normalized package name match | Debian stable package indexes: git-svn from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | fast, scalable, distributed revision control system (svn interoperability) | https://git-scm.com/
- Debian apt - gitk - 1:2.47.3-0+deb13u1: normalized package name match | Debian stable package indexes: gitk from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | fast, scalable, distributed revision control system (revision tree visualizer) | https://git-scm.com/
- Debian apt - gitweb - 1:2.47.3-0+deb13u1: normalized package name match | Debian stable package indexes: gitweb from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | fast, scalable, distributed revision control system (web interface) | https://git-scm.com/
- Nix - git: normalized package name match | nixpkgs package indexes: pkgs/by-name/gi/git/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - git - 1:2.43.0-1ubuntu7: normalized package name match | Ubuntu 24.04 LTS package indexes: git from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | fast, scalable, distributed revision control system | https://git-scm.com/
- Ubuntu apt - git-all - 1:2.43.0-1ubuntu7: normalized package name match | Ubuntu 24.04 LTS package indexes: git-all from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | fast, scalable, distributed revision control system (all subpackages) | https://git-scm.com/
- Ubuntu apt - git-cvs - 1:2.43.0-1ubuntu7: normalized package name match | Ubuntu 24.04 LTS package indexes: git-cvs from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | fast, scalable, distributed revision control system (cvs interoperability) | https://git-scm.com/
- Ubuntu apt - git-daemon-run - 1:2.43.0-1ubuntu7: normalized package name match | Ubuntu 24.04 LTS package indexes: git-daemon-run from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | fast, scalable, distributed revision control system (git-daemon service) | https://git-scm.com/


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [gettext](https://www.automicvault.com/pkg/brew/gettext/) - Runtime dependency declared by Homebrew.
- [pcre2](https://www.automicvault.com/pkg/brew/pcre2/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://www.automicvault.com/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [git-svn](https://www.automicvault.com/pkg/brew/git-svn/) - Popular package that depends on this formula.
- [git-tools](https://www.automicvault.com/pkg/brew/git-tools/) - Package name indicates the same formula family.
- [git-credential-libsecret](https://www.automicvault.com/pkg/brew/git-credential-libsecret/) - Shares the same upstream homepage.
- [git-gui](https://www.automicvault.com/pkg/brew/git-gui/) - Shares the same upstream homepage.
- [breezy](https://www.automicvault.com/pkg/brew/breezy/) - Shares av.db curated category or tags: cli, developer-tools, distributed-vcs, version-control.
- [cvs](https://www.automicvault.com/pkg/brew/cvs/) - Shares av.db curated category or tags: cli, developer-tools, source-control, version-control.
- [darcs](https://www.automicvault.com/pkg/brew/darcs/) - Shares av.db curated category or tags: cli, developer-tools, distributed-vcs, version-control.
- [mercurial](https://www.automicvault.com/pkg/brew/mercurial/) - Shares av.db curated category or tags: cli, developer-tools, distributed-vcs, version-control.
- [rcs](https://www.automicvault.com/pkg/brew/rcs/) - Shares av.db curated category or tags: cli, developer-tools, source-control, version-control.
- [subversion](https://www.automicvault.com/pkg/brew/subversion/) - Shares av.db curated category or tags: cli, developer-tools, source-control, version-control.
- [braid](https://www.automicvault.com/pkg/brew/braid/) - Shares av.db curated category or tags: cli, developer-tools, version-control.
- [codeberg-cli](https://www.automicvault.com/pkg/brew/codeberg-cli/) - Shares av.db curated category or tags: cli, developer-tools, version-control.

## Combined YAML source

View the package source record on GitHub. [combined/git.yml](https://github.com/automic-vault/db/blob/main/combined/git.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- approval-gate seed metadata
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
- curated agent safety answer
