# Install ugit with Homebrew, MacPorts, Nix

Undo git commands. Your damage control git buddy. Version 5.9 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:ugit
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install ugit
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install ugit
```

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

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#ugit
```

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

## Package facts

- **Package key:** brew:ugit
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/ugit>
- **Version:** 5.9
- **Source summary:** Undo git commands. Your damage control git buddy
- **Homepage:** <https://bhupesh.me/undo-your-last-git-mistake-with-ugit/>
- **Repository:** <https://github.com/Bhupesh-V/ugit>
- **Upstream docs:** <https://github.com/Bhupesh-V/ugit#readme>
- **License:** MIT
- **Source archive:** <https://github.com/Bhupesh-V/ugit/archive/refs/tags/v5.9.tar.gz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- ugit (cli)
- ugit (alias)

## Dependencies

- bash
- fzf

## Install behavior

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

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 5.9
- Local data: ok
- Upstream repository: https://github.com/Bhupesh-V/ugit
- Upstream latest detected: v5.9 (current)
- info: No package-manager update timestamp was available.
## Project history and usage

ugit is a shell-oriented Git recovery helper for undoing common accidental Git operations from an interactive terminal workflow.

### Project history

The public repository was created in 2021. The upstream README describes ugit as a guided tool for undoing Git mistakes, with support for operations such as commit, add, push, branch deletion, pull, reset, stash, merge, cherry-pick, and file restoration.

The author's project article, published on April 30, 2021, framed ugit as a small tool for beginner-to-intermediate Git users who otherwise lose time searching for recovery commands. The project later continued through tagged releases, including v5.0 in 2021 and v5.9 in 2025.

### Adoption history

ugit's official README documents installation through Homebrew on macOS, an install script on Linux, Docker, shell plugin managers, and manual setup on Windows with Git Bash and fzf. The supplied package data records packaging in Homebrew, MacPorts, and Nix.

The README's news section records early attention in 2021 and 2022, including a Changelog News mention, a GitHub India Constellation talk about Git tooling, and the project passing 1,000 GitHub stars in October 2022.

### How it is used

ugit is used after a Git mistake to pick a scenario and run the relevant recovery steps. It depends on Bash, Git, fzf, and standard Unix utilities, which makes it fit naturally into interactive shell use rather than IDE-only workflows.

The README also warns that some recovery paths depend on Git reflog retention, so package users may need to tune Git garbage-collection settings if they expect longer undo windows.

### Why package nerds care

For package-manager users, ugit is a small example of terminal UX around an existing tool rather than a new VCS. Its value is packaging a set of hard-to-remember Git recovery recipes into a command that can be installed next to fzf, git-extras, and other shell helpers.

### Timeline

- 2021: Public GitHub repository created.
- 2021: Author published the ugit project article and the project appeared on Changelog News.
- 2021: v5.0 release published.
- 2022: README recorded that ugit crossed 1,000 GitHub stars.
- 2025: v5.9 release published.

### Related projects

- The README notes a command-name conflict with git-extras, because both projects can provide a git-undo command.
- ugit is built around Git and fzf and is commonly installed alongside other shell and Git workflow helpers.

### Sources

- <https://api.github.com/repos/Bhupesh-V/ugit>
- <https://api.github.com/repos/Bhupesh-V/ugit/releases?per_page=10>
- <https://bhupesh.me/undo-your-last-git-mistake-with-ugit/>
- <https://github.com/Bhupesh-V/ugit>
- <https://raw.githubusercontent.com/Bhupesh-V/ugit/master/README.md>
- source_facts.package-manager


## 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:** ugit
- **Version Scheme:** 0
- **Revision:** 0
- **Conflicts With:** git-extras
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Nix - ugit: normalized package name match | nixpkgs package indexes: pkgs/by-name/ug/ugit/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - ugit: normalized package name match | MacPorts ports tree: devel/ugit/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 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.
- [fzf](https://www.automicvault.com/pkg/brew/fzf/) - Runtime dependency declared by Homebrew.
- [gource](https://www.automicvault.com/pkg/brew/gource/) - Shares av.db curated category or tags: cli, developer-tool, developer-tools, git, version-control.
- [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-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.
- [forgit](https://www.automicvault.com/pkg/brew/forgit/) - Local package facts share a topical domain. Shared terms: cli, commands, control, developer, developer-tools.
- [git-recent](https://www.automicvault.com/pkg/brew/git-recent/) - Local package facts share a topical domain. Shared terms: cli, control, developer, developer-tools, fzf.
- [git-subrepo](https://www.automicvault.com/pkg/brew/git-subrepo/) - Local package facts share a topical domain. Shared terms: bash, cli, control, developer, developer-tools.

## Combined YAML source

View the package source record on GitHub. [combined/ugit.yml](https://github.com/automic-vault/db/blob/main/combined/ugit.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
