# Install git-format-staged with Homebrew

Git command to transform staged files using a formatting command. Version 4.0.1 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:git-format-staged
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install git-format-staged
```

  Evidence: local Homebrew formula metadata

## Package facts

- **Package key:** brew:git-format-staged
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/git-format-staged>
- **Version:** 4.0.1
- **Source summary:** Git command to transform staged files using a formatting command
- **Homepage:** <https://github.com/hallettj/git-format-staged>
- **Repository:** <https://github.com/hallettj/git-format-staged>
- **Upstream docs:** <https://github.com/hallettj/git-format-staged#readme>
- **License:** MIT
- **Source archive:** <https://github.com/hallettj/git-format-staged/archive/refs/tags/v4.0.1.tar.gz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- git-format-staged (cli)
- git-format-staged (alias)

## Uses from macOS

- python

## Install behavior

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

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 4.0.1
- Local data: ok
- Upstream repository: https://github.com/hallettj/git-format-staged
- Upstream latest detected: v4.0.1 (current)
- info: No package-manager update timestamp was available.
## Project history and usage

git-format-staged is a Python Git helper that runs a formatter or linter against the staged version of files, preserving unstaged working-tree edits.

### Project history

The repository began in March 2018. Its README explains the project as a response to pre-commit formatting hooks that run a formatter over working-tree files and then restage the result, a pattern that can accidentally commit unrelated unstaged edits or disrupt `git add -p` workflows.

### Adoption history

git-format-staged sits in the ecosystem around Prettier, Husky, lint-staged, pre-commit, pretty-quick, and language-specific hook managers. It distinguishes itself by formatting blobs from the Git index and then attempting to patch the working tree afterward, rather than stashing user edits before formatting.

### How it is used

Practitioners install it through Nix, npm, Homebrew, or by copying the script, then call it from pre-commit hooks with a formatter command that reads from stdin and writes to stdout. Typical use passes file patterns and a formatter placeholder, such as running Prettier with `--stdin-filepath` for staged JavaScript, TypeScript, or CSS files.

### Why package nerds care

The package is notable because it solves a small but sharp Git-index problem without tying users to one language ecosystem. That makes it attractive for polyglot repositories and hook setups where the important boundary is Git's staged content rather than a particular formatter.

### Timeline

- 2018: The repository began with an initial commit.
- 2018: The v1.0.0 tag established the installable Git helper.
- Later releases: Packaging expanded across npm, Nix, and Homebrew usage paths.

### Related projects

- git-format-staged is commonly compared with lint-staged, pre-commit, pretty-quick, precise-commits, Husky, and formatter tools such as Prettier.

### Sources

- <https://formulae.brew.sh/formula/git-format-staged>
- <https://github.com/hallettj/git-format-staged>
- <https://github.com/hallettj/git-format-staged#readme>


## 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-format-staged
- **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


## 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.
- [git-delete-merged-branches](https://www.automicvault.com/pkg/brew/git-delete-merged-branches/) - Shares av.db curated category or tags: cli, developer-tools, git, git-extensions, version-control.
- [git-delta](https://www.automicvault.com/pkg/brew/git-delta/) - Shares av.db curated category or tags: cli, developer-tools, git, git-extensions, version-control.
- [git-extras](https://www.automicvault.com/pkg/brew/git-extras/) - Shares av.db curated category or tags: cli, developer-tools, git, git-extensions, version-control.
- [git-filter-repo](https://www.automicvault.com/pkg/brew/git-filter-repo/) - Shares av.db curated category or tags: cli, developer-tools, git, git-extensions, version-control.
- [git-flow](https://www.automicvault.com/pkg/brew/git-flow/) - Shares av.db curated category or tags: cli, developer-tools, git, git-extensions, version-control.
- [git-fresh](https://www.automicvault.com/pkg/brew/git-fresh/) - Shares av.db curated category or tags: cli, developer-tools, git, git-extensions, version-control.
- [git-lfs](https://www.automicvault.com/pkg/brew/git-lfs/) - Shares av.db curated category or tags: cli, developer-tools, git, git-extensions, version-control.
- [aicommit](https://www.automicvault.com/pkg/brew/aicommit/) - Shares av.db curated category or tags: cli, developer-tools, git, version-control.
- [git-format-staged](https://www.automicvault.com/pkg/npm/git-format-staged/) - Same normalized package name appears in another local ecosystem. Shared terms: files, format, git, git-format-staged, staged.
- [git-format-staged](https://www.automicvault.com/pkg/npm/git-format-staged/) - Same normalized package name in another local ecosystem.

## Combined YAML source

View the package source record on GitHub. [combined/git-format-staged.yml](https://github.com/automic-vault/db/blob/main/combined/git-format-staged.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
- cross-ecosystem install command graph
