Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
L

lazygit

> 开发工具
Free

simple terminal UI for git commands

83.3K stars0 likes2 views
WebsiteGitHub

About

simple terminal UI for git commands

Warp, the intelligent terminal
Available for macOS and Linux


Tuple, the premier screen sharing app for developers on macOS and Windows.


I (Jesse) co-founded Subble to save your company time and money by finding unused and over-provisioned SaaS licences. Check it out!

## Sponsors

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 - [Sponsors](#sponsors) - [Elevator Pitch](#elevator-pitch) - [Table of contents](#table-of-contents) - [Features](#features) - [Stage individual lines](#stage-individual-lines) - [Interactive Rebase](#interactive-rebase) - [Cherry-pick](#cherry-pick) - [Bisect](#bisect) - [Nuke the working tree](#nuke-the-working-tree) - [Amend an old commit](#amend-an-old-commit) - [Filter](#filter) - [Invoke a custom command](#invoke-a-custom-command) - [Worktrees](#worktrees) - [Rebase magic (custom patches)](#rebase-magic-custom-patches) - [Rebase from marked base commit](#rebase-from-marked-base-commit) - [Undo](#undo) - [Commit graph](#commit-graph) - [Compare two commits](#compare-two-commits) - [Tutorials](#tutorials) - [Installation](#installation) - [Binary Releases](#binary-releases) - [Dev container](#dev-container-feature) - [Homebrew](#homebrew) - [MacPorts](#macports) - [Void Linux](#void-linux) - [Scoop (Windows)](#scoop-windows) - [gah (Linux and Mac OS)](#gah-linux-and-mac-os) - [Arch Linux](#arch-linux) - [Fedora / Amazon Linux 2023 / CentOS Stream](#fedora--amazon-linux-2023--centos-stream) - [Fedora / RHEL Derivatives (Terra)](#fedora--rhel-derivatives-terra) - [Solus Linux](#solus-linux) - [Debian and Ubuntu](#debian-and-ubuntu) - [Funtoo Linux](#funtoo-linux) - [Gentoo Linux](#gentoo-linux) - [openSUSE](#opensuse) - [NixOS](#nixos) - [Flox](#flox) - [FreeBSD](#freebsd) - [Termux](#termux) - [Conda](#conda) - [Go](#go) - [Chocolatey (Windows)](#chocolatey-windows) - [Winget (Windows 10 1709 or later)](#winget-windows-10-1709-or-later) - [Manual](#manual) - [Usage](#usage) - [Keybindings](#keybindings) - [Changing Directory On Exit](#changing-directory-on-exit) - [Undo/Redo](#undoredo) - [Configuration](#configuration) - [Custom Diff Renderers](#custom-diff-renderers) - [Custom Commands](#custom-commands) - [Git flow support](#git-flow-support) - [Contributing](#contributing) - [Debugging Locally](#debugging-locally) - [Donate](#donate) - [FAQ](#faq) - [What do the commit colors represent?](#what-do-the-commit-colors-represent) - [Shameless Plug](#shameless-plug) - [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 `i` to start an interactive rebase. Then squash (`s`), fixup (`f`), drop (`d`), edit (`e`), move up (`ctrl+k`) or move down (`ctrl+j`) any of the TODO commits, before continuing the rebase by bringing up the rebase options menu with `m` and then selecting `continue`. You can also perform any of these actions as a once-off (e.g. pressing `s` on a commit to squash it) without explicitly starting a rebase. This demo also uses shift+down to select a range of commits to move and fixup. ### Cherry-pick Press `shift+c` on a commit to copy it and press `shift+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=N4E2B_k2Bss), 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 `` on the commit to view its files, then `` on a file to focus the patch, then `` to add the comment line to our custom patch, and then `ctrl+p` to view the custom patch options; selecting to remove the patch from the current commit. Learn more in the [Rebase magic Youtube tutorial](https://youtu.be/4XaToVut_hs). ### Rebase from marked base commit Say you're on a feature branch that was itself branched off of the develop branch, and you've decided you'd rather be branching off the master branch. You need a way to rebase only the commits from your feature branch. In this demo we check to see which was the last commit on the develop branch, then press `shift+b` to mark that commit as our base commit, then press `r` on the master branch to rebase onto it, only bringing across the commits from our feature branch. Then we push our changes with `shift+p`. ### Undo You can undo the last action by pressing `z` and redo with `shift+z`. Here we drop a couple of commits and then undo the actions. Undo uses the reflog which is specific to commits and branches so we can't undo changes to the working tree or stash.

Issues· 1059 open

View all issuesOpen on GitHub
  • #5670

    Commit author full initials options?

    enhancementUpdated Sep 28, 2026
  • #6074

    Allow copying multiple commit hashes with <c-o>

    enhancementUpdated Sep 27, 2026
  • #6072

    Toggle for `--no-verify` for all actions

    enhancementUpdated Sep 27, 2026
  • #2304

    Disable bold highlight

    enhancementUpdated Sep 27, 2026
  • #5497

    Commit graph is visually misleading near branch tips (branch divergence unclear)

    enhancementUpdated Sep 25, 2026
  • #6058

    Allow editing a directory in file view

    enhancementUpdated Sep 25, 2026
  • #4115

    Extend commit panel with branch operations (switch/rename/delete)

    enhancementUpdated Sep 25, 2026
  • #6056

    Commits panel: checkout fails for a branch in another worktree

    Updated Sep 25, 2026
  • #5974

    Help test the new stage-hunks-in-main-view feature

    Updated Sep 24, 2026
  • #6055

    Staging pannel goes inactive when fully maximized

    bugUpdated Sep 24, 2026

> Tags

Gocligitterminal

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 17, 2026
Category开发工具
PricingFree

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具