# Install stgit with Homebrew, apk, apt, dnf, MacPorts, Nix, zypper, scoop

Manage Git commits as a stack of patches. Version 2.6.1 via Homebrew; verified 2026-06-22. Also installable with debian: sudo apt install stgit.

## Install

```sh
sudo av install brew:stgit
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install stgit
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install stgit
```

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

### Linux

- apk (92%):

```sh
sudo apk add stgit
```

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

- Debian apt (92%):

```sh
sudo apt install stgit
```

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

- dnf (92%):

```sh
sudo dnf install stgit
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#stgit
```

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

- zypper (92%):

```sh
sudo zypper install stgit
```

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

### Windows

- Scoop (92%):

```sh
scoop install main/stgit
```

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

## Package facts

- **Package key:** brew:stgit
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/stgit>
- **Version:** 2.6.1
- **Source summary:** Manage Git commits as a stack of patches
- **Homepage:** <https://stacked-git.github.io>
- **Repository:** <https://github.com/stacked-git/stgit>
- **Upstream docs:** <https://stacked-git.github.io>
- **License:** GPL-2.0-only
- **Source archive:** <https://github.com/stacked-git/stgit/releases/download/v2.6.1/stgit-2.6.1.tar.gz>
- **Last updated:** 2026-06-22T09:29:52Z
- **Generated:** 2026-08-04T22:13:35+00:00

## Executables

- stg (cli)
- stg (alias)

## Build dependencies

- asciidoc
- pkgconf
- rust
- xmlto

## Uses from macOS

- curl
- git

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-08-04
- Package-manager version: 2.6.1
- Package-manager updated: 2026-06-22
- Local data: ok
- Upstream repository: https://github.com/stacked-git/stgit
- info: No cached GitHub release or tag data was available.
## Project history and usage

Stacked Git, or StGit, is a command-line tool for managing Git commits as a stack of patches. It sits in the long-lived patch-queue tradition and gives Git users push, pop, refresh, and reorder operations for local patch series.

### Project history

StGit's official documentation presents the project as an application for managing Git commits as a stack of patches, with the command-line executable stg. The project was originally implemented in Python and, as of version 2.0.0, is implemented in Rust.

### Adoption history

The project homepage documents availability through Homebrew, MacPorts, Arch, Gentoo, crates.io, Guix, and Nix, plus project-provided deb, rpm, and msi packages. That package spread is notable because StGit appeals to version-control users who want a portable workflow across developer machines.

### How it is used

StGit is used inside ordinary Git repositories after initializing a patch stack. The tutorial compares it to Quilt and Mercurial Queues: patches are stored as Git commits, but StGit adds stack operations beyond regular commit editing.

### Why package nerds care

Package nerds care about StGit because patch-stack tooling is part of distro and upstream-maintainer muscle memory. It helps maintain clean commit series, revise patches repeatedly, and prepare email-based or upstreamable changes without abandoning Git.

### Timeline

- 2017: The stacked-git/stgit GitHub repository was created.
- 2020s: StGit 2.0.0 marked the move from Python to Rust according to the official homepage.
- 2020s: The project documents package availability across Homebrew, MacPorts, Arch, Gentoo, crates.io, Guix, and Nix.

### Related projects

- Git is the required underlying version-control system.
- Quilt and Mercurial Queues are named by the official tutorial as comparable patch-stack tools.
- Email patch workflows are covered by the official tutorial.

### Sources

- <https://api.github.com/repos/stacked-git/stgit>
- <https://github.com/stacked-git/stgit#readme>
- <https://stacked-git.github.io/>
- <https://stacked-git.github.io/guides/tutorial/>
- source_facts.package-manager


## Security Notes

No matching local secret-handling manifest was found for stgit. Package metadata is still published here so future coverage has a stable package URL.


## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** stgit
- **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 - stgit - 0.19-2: normalized package name match | Debian stable package indexes: stgit from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | manage stacks of patches in a git repository | http://www.procode.org/stgit/
- Debian apt - stgit-contrib - 0.19-2: normalized package name match | Debian stable package indexes: stgit-contrib from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | set of contributed script to help working with stgit | http://www.procode.org/stgit/
- Nix - stgit: normalized package name match | nixpkgs package indexes: pkgs/by-name/st/stgit/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - stgit - 0.19-1.1: normalized package name match | Ubuntu 24.04 LTS package indexes: stgit from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | manage stacks of patches in a git repository | http://www.procode.org/stgit/
- Ubuntu apt - stgit-contrib - 0.19-1.1: normalized package name match | Ubuntu 24.04 LTS package indexes: stgit-contrib from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | set of contributed script to help working with stgit | http://www.procode.org/stgit/
- apk - stgit - 2.6.1-r0: normalized package name match | Alpine Linux edge package indexes: stgit from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Manage a stack of patches using GIT as a backend | http://www.github.com/stacked-git/stgit
- apk - stgit-bash-completion - 2.6.1-r0: normalized package name match | Alpine Linux edge package indexes: stgit-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Bash completions for stgit | http://www.github.com/stacked-git/stgit
- apk - stgit-doc - 2.6.1-r0: normalized package name match | Alpine Linux edge package indexes: stgit-doc from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Manage a stack of patches using GIT as a backend (documentation) | http://www.github.com/stacked-git/stgit
- apk - stgit-emacs - 2.6.1-r0: normalized package name match | Alpine Linux edge package indexes: stgit-emacs from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | stg plugin for emacs | http://www.github.com/stacked-git/stgit
- apk - stgit-fish-completion - 2.6.1-r0: normalized package name match | Alpine Linux edge package indexes: stgit-fish-completion from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Fish completions for stgit | http://www.github.com/stacked-git/stgit
- apk - stgit-vim - 2.6.1-r0: normalized package name match | Alpine Linux edge package indexes: stgit-vim from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | vim filetype and syntax for stgit files | http://www.github.com/stacked-git/stgit
- apk - stgit-zsh-completion - 2.6.1-r0: normalized package name match | Alpine Linux edge package indexes: stgit-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Zsh completions for stgit | http://www.github.com/stacked-git/stgit
- dnf - stgit - 2.6.1-2.fc45: normalized package name match | Fedora Rawhide package metadata: stgit from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Stack-based patch management for Git | https://stacked-git.github.io/
- zypper - stgit - 2.6.1-3.2: normalized package name match | openSUSE Tumbleweed package metadata: stgit from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Stacked GIT - Source Code Management Tool | https://stacked-git.github.io
- zypper - stgit-bash-completion - 2.6.1-3.2: normalized package name match | openSUSE Tumbleweed package metadata: stgit-bash-completion from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Bash Completion for stgit | https://stacked-git.github.io
- zypper - stgit-emacs - 2.6.1-3.2: normalized package name match | openSUSE Tumbleweed package metadata: stgit-emacs from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | emacs plugin for for stgit | https://stacked-git.github.io


## Related links

- [Source-control packages](https://pkg.so/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://pkg.so/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [pkgconf](https://pkg.so/brew/pkgconf/) - Build dependency declared by Homebrew.
- [rust](https://pkg.so/brew/rust/) - Build dependency declared by Homebrew.
- [asciidoc](https://pkg.so/brew/asciidoc/) - Build dependency declared by Homebrew.
- [xmlto](https://pkg.so/brew/xmlto/) - Build dependency declared by Homebrew.
- [topgit](https://pkg.so/brew/topgit/) - Shares pkgdb curated category or tags: cli, developer-tools, git, patch-management, version-control.
- [libgit2](https://pkg.so/brew/libgit2/) - Shares pkgdb curated category or tags: cli, developer-tools, git, version-control.
- [git-lfs](https://pkg.so/brew/git-lfs/) - Shares pkgdb curated category or tags: cli, developer-tools, git, version-control.
- [lazygit](https://pkg.so/brew/lazygit/) - Shares pkgdb curated category or tags: cli, developer-tools, git, version-control.
- [git-gui](https://pkg.so/brew/git-gui/) - Shares pkgdb curated category or tags: cli, developer-tools, git, version-control.
- [tig](https://pkg.so/brew/tig/) - Shares pkgdb curated category or tags: cli, developer-tools, git, version-control.
- [hub](https://pkg.so/brew/hub/) - Shares pkgdb curated category or tags: cli, developer-tools, git, version-control.
- [repo](https://pkg.so/brew/repo/) - Shares pkgdb curated category or tags: cli, developer-tools, git, version-control.
- [commitizen](https://pkg.so/brew/commitizen/) - Local package facts share a topical domain. Shared terms: cli, commits, control, developer, developer-tools.
- [dura](https://pkg.so/brew/dura/) - Local package facts share a topical domain. Shared terms: cli, commits, control, developer, developer-tools.

## Combined YAML source

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


## Sources

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
