# Install ugit with Homebrew, MacPorts, Nix

Undo git commands. Your damage control git buddy. Version 5.9 via Homebrew; verified from local package data. Also installable with nix: nix profile install nixpkgs#ugit.

## 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
- **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>
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- ugit (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 5.9
## 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

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


## Combined YAML source

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


## Sources

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