Maintenance of this project is made possible by all the contributors and sponsors. If you'd like to sponsor this project and have your avatar or company logo appear below click here. 💙
Elevator Pitch -- Rant time: You've heard it before, git is _powerful_, but what good is that power when everything is so damn hard to do? Interactive rebasing requires you to edit a goddamn TODO file in your editor? _Are you kidding me?_ To stage part of a file you need to use a command line program to step through each hunk and if a hunk can't be split down any further but contains code you don't want to stage, you have to edit an arcane patch file _by hand_? _Are you KIDDING me?!_ Sometimes you get asked to stash your changes when switching branches only to realise that after you switch and unstash that there weren't even any conflicts and it would have been fine to just checkout the branch directly? _YOU HAVE GOT TO BE KIDDING ME!_ If you're a mere mortal like me and you're tired of hearing how powerful git is when in your daily life it's a powerful pain in your ass, lazygit might be for you. ## Table of contents - [Features](#features) - [Tutorials](#tutorials) - [Installation](#installation) - [Binary releases](#binary-releases) - [Homebrew](#homebrew) - [MacPorts](#macports) - [Void Linux](#void-linux) - [Scoop (Windows)](#scoop-windows) - [Arch Linux](#arch-linux) - [Fedora and RHEL](#fedora-and-rhel) - [Solus Linux](#solus-linux) - [Ubuntu](#ubuntu) - [Funtoo Linux](#funtoo-linux) - [Gentoo Linux](#gentoo-linux) - [FreeBSD](#freebsd) - [Conda](#conda) - [Go](#go) - [Chocolatey (Windows)](#chocolatey-windows) - [Manual](#manual) - [Usage](#usage) - [Keybindings](#keybindings) - [Changing directory on exit](#changing-directory-on-exit) - [Undo/Redo](#undoredo) - [Configuration](#configuration) - [Custom pagers](#configuration) - [Custom commands](#configuration) - [Contributing](#contributing) - [Donate](#donate) - [Alternatives](#alternatives) Lazygit is not my fulltime job but it is a hefty part time job so if you want to support the project please consider [sponsoring me](https://github.com/sponsors/jesseduffield) ## Features ### Stage individual lines Press space on the selected line to stage it, or press `v` to start selecting a range of lines. You can also press `a` to select the entirety of the current hunk.  ### Interactive Rebase Press `e` on a commit to start an interactive rebase on it: causing all above commits to become part of the TODO file. Then squash (`s`), fixup (`f`), drop (`d`), edit (`e`), move up (ctrl+i) or move down (ctrl+j) any of TODO commits, before continuing the rebase by bringing up the rebase options menu with `m` and then selecting `continue`. You can also perform any these actions as a once-off (e.g. pressing `s` on a commit to squash it) without explicitly starting a rebase.  ### Cherry-pick Press `c` on a commit to copy it and press `v` to paste (cherry-pick) it.  ### Bisect Press `b` in the commits view to mark a commit as good/bad in order to begin a git bisect.  ### Nuke the working tree For when you really want to just get rid of anything that shows up when you run `git status` (and yes that includes dirty submodules) [kidpix style](https://www.youtube.com/watch?v=Ur7_A4JusMU), press `shift+d` to bring up the reset options menu and then select the 'nuke' option.  ### Amend an old commit Pressing `shift+a` on any commit will amend that commit with the currently staged changes (running an interactive rebase in the background).  ### Filter You can filter a view with `/`. Here we filter down our branches view and then hit `enter` to view its commits.  ### Invoke a custom command Lazygit has a very flexible [custom command system](docs/Custom_Command_Keybindings.md). In this example a custom command is defined which emulates the built-in branch checkout action.  ### Worktrees You can create worktrees to have multiple branches going at once without the need for stashing or creating WIP commits when switching between them. Press `w` in the branches view to create a worktree from the selected branch and switch to it.  ### Rebase magic (custom patches) You can build a custom patch from an old commit and then remove the patch from the commit, split out a new commit, apply the patch in reverse to the index, and more. In this example we have a redundant comment that we want to remove from an old commit. We hit `
](https://youtu.be/CPLdltN7wgE)
- [15 Lazygit Features in 15 Minutes](https://youtu.be/CPLdltN7wgE)
- [Basics Tutorial](https://youtu.be/VDXvbHZYeKY)
- [Rebase Magic Tutorial](https://youtu.be/4XaToVut_hs)
## Installation
[](https://repology.org/project/lazygit/versions)
_Most of the above packages are maintained by third parties so be sure to vet them yourself and confirm that the maintainer is a trustworthy looking person who attends local sports games and gives back to their communities with barbeque fundraisers etc_
### Binary Releases
For Windows, Mac OS(10.12+) or Linux, you can download a binary release [here](../../releases).
### Homebrew
Normally the lazygit formula can be found in the Homebrew core but we suggest you tap our formula to get the frequently updated one. It works with Linux, too.
Tap:
```
brew install jesseduffield/lazygit/lazygit
```
Core:
```
brew install lazygit
```
### MacPorts
Latest version built from github releases.
Tap:
```
sudo port install lazygit
```
### Void Linux
Packages for Void Linux are available in the distro repo
They follow upstream latest releases
```sh
sudo xbps-install -S lazygit
```
### Scoop (Windows)
You can install `lazygit` using [scoop](https://scoop.sh/). It's in the `extras` bucket:
```sh
# Add the extras bucket
scoop bucket add extras
# Install lazygit
scoop install lazygit
```
### Arch Linux
Packages for Arch Linux are available via pacman and AUR (Arch User Repository).
There are two packages. The stable one which is built with the latest release
and the git version which builds from the most recent commit.
- Stable: `sudo pacman -S lazygit`
- Development:
Check out this [video](https://www.youtube.com/watch?v=kNavnhzZHtk) walking through the creation of a small feature in lazygit if you want an idea of where to get started.
### Debugging Locally
Run `lazygit --debug` in one terminal tab and `lazygit --logs` in another to view the program and its log output side by side
## Donate
If you would like to support the development of lazygit, consider [sponsoring me](https://github.com/sponsors/jesseduffield) (github is matching all donations dollar-for-dollar for 12 months)
## FAQ
### What do the commit colors represent?
- Green: the commit is included in the master branch
- Yellow: the commit is not included in the master branch
- Red: the commit has not been pushed to the upstream branch
## Shameless Plug
If you want to see what I (Jesse) am up to in terms of development, follow me on
[twitter](https://twitter.com/DuffieldJesse) or check out my [blog](https://jesseduffield.com/)
```
``` asdfas
## Alternatives
```
If you find that lazygit doesn't quite satisfy your requirements, these may be a better fit:
- [GitUI](https://github.com/Extrawurst/gitui)
- [tig](https://github.com/jonas/tig)