# lazygit

> Terminal UI for git commands with visual interface for staging, committing, branching, and repository management

Stars: 83.6k · Language: Go · License: MIT · Categories: Git

- Repository: https://github.com/jesseduffield/lazygit
- Page: https://www.trmn.sh/tools/lazygit

## Install

- Homebrew: `brew install lazygit`

## Overview

Lazygit is a terminal user interface for Git that provides a visual, interactive way to perform Git operations. Instead of typing individual Git commands, users navigate through panels showing the repository status, file changes, commit history, and branch structure using keyboard shortcuts and mouse interactions.

The tool displays unstaged and staged changes in separate panels, allowing users to stage individual lines or hunks of code with simple keystrokes. It supports standard Git workflows including committing, pushing, pulling, branching, merging, rebasing, and stashing. Users can view diffs, browse commit history, manage branches, and resolve merge conflicts through the interface.

Lazygit runs entirely in the terminal and works with any Git repository. It provides keyboard shortcuts for all major Git operations and displays real-time repository status. The interface organizes information into logical panels, making it easier to understand the current state of a repository compared to command-line Git output. This makes it particularly useful for developers who prefer visual interfaces but want to stay in the terminal environment.

### Installation

```bash
# via Homebrew
brew install lazygit
```

![Lazygit commit and push demo](https://raw.githubusercontent.com/jesseduffield/lazygit/master/assets/demo/commit_and_push-compressed.gif)

## Alternatives

- [gh](https://www.trmn.sh/tools/gh.md): Official GitHub CLI tool for managing pull requests, issues, and repositories from the command line (Go, 46.8k stars)
- [gitleaks](https://www.trmn.sh/tools/gitleaks.md): Detects secrets like passwords, API keys, and tokens in git repositories, files, and stdin input (Go, 30.6k stars)
- [git-lfs](https://www.trmn.sh/tools/git-lfs.md): Git extension for managing large files by storing them outside the repository with pointer files (Go, 14.6k stars)
- [gh-dash](https://www.trmn.sh/tools/gh-dash.md): Terminal UI for GitHub that lists configurable pull request and issue sections, with vim-style hotkeys, custom actions, and a YAML config file. (Go, 12.7k stars)
- [soft-serve](https://www.trmn.sh/tools/soft-serve.md): Self-hostable Git server with SSH-accessible TUI for command-line repository management and browsing. (Go, 7.3k stars)

## Guides

- [A terminal git workflow with lazygit and delta](https://www.trmn.sh/guides/lazygit-delta-workflow): Install lazygit and delta, set delta as git's pager, render lazygit diffs with it, and stage hunks, commit and rebase from the keyboard.
- [lazygit Alternatives](https://www.trmn.sh/alternatives/lazygit): lazygit alternatives compared: gitui, gitu and tig as terminal Git UIs, plus forgit for fzf-based Git commands in Bash, Zsh and Fish.
- [Best Git TUIs](https://www.trmn.sh/best/git-tuis): Compare lazygit, gitui, tig and gitu: terminal Git interfaces for staging hunks and lines, committing, and managing branches.
- [lazygit vs gitui](https://www.trmn.sh/compare/lazygit-vs-gitui): lazygit (Go) vs gitui (Rust): two MIT-licensed terminal Git UIs compared on interface, speed on large repos, hooks and install options.
- [lazygit vs tig](https://www.trmn.sh/compare/lazygit-vs-tig): lazygit vs tig: a Go panel-based Git UI for staging and rebasing compared with a C ncurses browser and pager for history.

---

Canonical: https://www.trmn.sh/tools/lazygit
