# Install git-subrepo with Homebrew, apt, Nix, zypper

Git Submodule Alternative. Version 0.4.9 via Homebrew; verified 2026-06-22.

## Install

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

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install git-subrepo
```

  Evidence: local Homebrew formula metadata

### Linux

- Debian apt (92%):

```sh
sudo apt install git-subrepo
```

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

- Nix (92%):

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

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

- zypper (92%):

```sh
sudo zypper install git-subrepo
```

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

## Package facts

- **Package key:** brew:git-subrepo
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/git-subrepo>
- **Version:** 0.4.9
- **Source summary:** Git Submodule Alternative
- **Homepage:** <https://github.com/ingydotnet/git-subrepo>
- **Repository:** <https://github.com/ingydotnet/git-subrepo>
- **Upstream docs:** <https://github.com/ingydotnet/git-subrepo#readme>
- **License:** MIT
- **Source archive:** <https://github.com/ingydotnet/git-subrepo/archive/refs/tags/0.4.9.tar.gz>
- **Last updated:** 2026-06-22T14:03:31-07:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- git-subrepo (cli)
- git-subrepo (alias)

## Dependencies

- bash

## Build dependencies

- gnu-sed

## Install behavior

- Post-install hook: not defined
- Bottle: available on all

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.4.9
- Package-manager updated: 2026-06-22
- Local data: ok
- Upstream repository: https://github.com/ingydotnet/git-subrepo
- Upstream latest detected: 0.4.9 (current)
## Project history and usage

git-subrepo is a Git extension for embedding external repositories into subdirectories while avoiding many workflow problems associated with submodules and subtrees.

### Project history

The repository began in 2013 and framed git-subrepo as a solid alternative to Git submodule and subtree workflows. Its introductory documentation argues that users, collaborators, and repository owners have different needs, and that submodules especially impose knowledge and synchronization burdens on people who only want to clone and use a project.

The design stores subrepository metadata in a .gitrepo file inside the subdirectory, squashes pulls into the mainline history, and keeps refs for subrepo fetch and push workflows. A major 0.4.0-era redesign in 2018 shifted implementation details toward merge and rebase methods, with later 0.4.x releases improving testing, shell compatibility, path handling, Git version behavior, and completion scripts.

### Adoption history

git-subrepo serves a persistent niche: projects that want vendored source trees with upstream synchronization but do not want users to run git submodule update. Its package-manager presence in Homebrew, Debian, Nix, and openSUSE-style packaging gives maintainers a packaged alternative for teams that reject Git submodules but still need upstream push and pull operations.

### How it is used

Practitioners clone an external repository into a subdirectory, initialize an existing subdirectory as a subrepo, pull upstream updates, push local subdirectory changes back, inspect status, clean metadata refs, and rely on .gitrepo to mark and configure each embedded repository.

### Why package nerds care

git-subrepo is important in package-maintenance culture because it addresses the recurring vendor-versus-submodule choice. It favors normal clone behavior for downstream users while preserving enough metadata for maintainers to synchronize embedded code with upstream projects.

### Timeline

- 2013: First public commit appeared in the GitHub repository.
- 2015: 0.2.x and 0.3.0 tags marked early public releases.
- 2018: 0.4.0 release documented a redesign around merge and rebase methods.
- 2024: 0.4.7 through 0.4.9 releases included compatibility and packaging fixes.

### Related projects

- The project's own documentation compares it directly with git-submodule and git-subtree, and also discusses subtree merge strategies as related Git practice.

### Sources

- <https://formulae.brew.sh/formula/git-subrepo>
- <https://github.com/ingydotnet/git-subrepo>
- <https://github.com/ingydotnet/git-subrepo/blob/master/Changes>
- <https://github.com/ingydotnet/git-subrepo/blob/master/Intro.pod>
- <https://github.com/ingydotnet/git-subrepo/blob/master/ReadMe.pod>
- <https://github.com/ingydotnet/git-subrepo/releases>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** git-subrepo
- **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-subrepo - 0.4.9-2: normalized package name match | Debian stable package indexes: git-subrepo from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Alternative to git-submodule(1) and git-subtree(1) | https://github.com/ingydotnet/git-subrepo
- Nix - git-subrepo: normalized package name match | nixpkgs package indexes: pkgs/by-name/gi/git-subrepo/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- zypper - git-subrepo - 0.4.6-2.4: normalized package name match | openSUSE Tumbleweed package metadata: git-subrepo from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Git Submodule Alternative | https://github.com/ingydotnet/git-subrepo
- zypper - git-subrepo-bash-completion - 0.4.6-2.4: normalized package name match | openSUSE Tumbleweed package metadata: git-subrepo-bash-completion from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Bash completion for git-subrepo | https://github.com/ingydotnet/git-subrepo
- zypper - git-subrepo-zsh-completion - 0.4.6-2.4: normalized package name match | openSUSE Tumbleweed package metadata: git-subrepo-zsh-completion from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | ZSH completion for git-subrepo | https://github.com/ingydotnet/git-subrepo


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [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.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [bash](https://www.automicvault.com/pkg/brew/bash/) - Runtime dependency declared by Homebrew.
- [gnu-sed](https://www.automicvault.com/pkg/brew/gnu-sed/) - Build dependency declared by Homebrew.
- [braid](https://www.automicvault.com/pkg/brew/braid/) - Shares av.db curated category or tags: cli, developer-tools, git, version-control.
- [codeberg-cli](https://www.automicvault.com/pkg/brew/codeberg-cli/) - Shares av.db curated category or tags: cli, developer-tools, git, version-control.
- [dura](https://www.automicvault.com/pkg/brew/dura/) - Shares av.db curated category or tags: cli, developer-tools, git, version-control.
- [gcli](https://www.automicvault.com/pkg/brew/gcli/) - Shares av.db curated category or tags: cli, developer-tools, git, version-control.
- [git-archive-all](https://www.automicvault.com/pkg/brew/git-archive-all/) - Shares av.db curated category or tags: cli, developer-tools, git, submodules, version-control.
- [git-branchless](https://www.automicvault.com/pkg/brew/git-branchless/) - Shares av.db curated category or tags: cli, developer-tools, git, version-control.
- [git-cinnabar](https://www.automicvault.com/pkg/brew/git-cinnabar/) - Shares av.db curated category or tags: cli, developer-tools, git, version-control.
- [git-cola](https://www.automicvault.com/pkg/brew/git-cola/) - Shares av.db curated category or tags: cli, developer-tools, git, version-control.

## Combined YAML source

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


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- 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
