the IT Hustle
ツール実践マニュアル概要
Productivity ToolsAI活用2026-04-02•12 min で読める

lazygit: Stop Memorizing Git Commands and Use This Instead

著者: Salty Deprecated Software Engineer

✨ AI アシスト コンテンツ

この記事はAIの支援を受けて作成され、正確性と品質についてチームが審査しました。すべての技術情報と例は検証済みです。

I've been using git for over a decade and I still Google "git undo last commit" at least once a month. I know the DAG. I understand the reflog. And yet, staring at a terminal wondering if git rebase -i HEAD~3 is about to destroy my afternoon is a universal developer experience.

lazygit makes git visual.It's a terminal UI (TUI) that shows you branches, commits, staged files, and diffs — all in one screen. You navigate with arrow keys and single-letter commands instead of memorizing flags.

It has over 53,000 GitHub stars, and developers who try it tend to never go back. Here's why.

What Is lazygit?

lazygit is a free, open-source terminal application written in Go that gives you a visual interface for git. Instead of typing commands, you see panels showing:

  • Files panel — what's modified, staged, and untracked
  • Branches panel — local and remote branches, with merge status
  • Commits panel — your commit history with diffs
  • Stash panel — saved work-in-progress

You press space to stage a file. c to commit. p to push. z to undo. No flags. No manual pages. No "wait, was it --hard or --soft?"

The 6 Things lazygit Does Better Than Raw Git

1. Staging Individual Lines (Not Just Files)

You changed 50 lines in a file but only want to commit 10 of them. In raw git, that's git add -p followed by an arcane y/n/s/e interface.

In lazygit, you see the diff, highlight the lines you want, and press space. Done. You can stage individual lines, hunks, or entire files with the same keypress.

2. Interactive Rebase Without the Pain

Interactive rebase is one of the most powerful git features and one of the most terrifying. In raw git:

Raw git:

git rebase -i HEAD~5

# Opens a text file with pick/squash/fixup/drop commands

# Edit the file, save, close, pray

lazygit:

Navigate to a commit → press 's' to squash, 'f' to fixup, 'd' to drop

# See results instantly. Press 'z' to undo if wrong.

3. Merge Conflict Resolution You Can Actually See

Merge conflicts in the terminal are a wall of <<<<<<< and >>>>>>>markers. lazygit shows you both versions side by side and lets you pick which one to keep with a single keypress. For each conflict section, press the left arrow for "ours" or right arrow for "theirs."

4. Undo Anything with 'z'

lazygit has a built-in undo/redo system that uses the git reflog under the hood. Dropped a commit by accident? Press z. Force-pushed the wrong branch? Press z. It's the Ctrl+Z that git never gave you.

5. Cherry-Pick by Dragging

Need to pull a specific commit from one branch to another? In lazygit, navigate to the commit, press c to copy, switch to the target branch, and press vto paste. It's cherry-pick without remembering the syntax.

6. Worktrees (Multiple Branches at Once)

Need to work on two branches simultaneously without stashing? Press w in the branches view to create a worktree. lazygit opens a separate working copy of your repo on the other branch. No stashing, no WIP commits, no context-switching headaches.

How to Install It

macOS (Homebrew):

brew install lazygit

Ubuntu/Debian:

sudo add-apt-repository ppa:lazygit-team/release
sudo apt update && sudo apt install lazygit

Windows (Scoop):

scoop install lazygit

Then just run:

lazygit

# Run from any git repository. That's it.

The Essential Keyboard Shortcuts

KeyActionGit equivalent
spaceStage/unstage filegit add / git reset
cCommitgit commit
p / PPush / Pullgit push / git pull
sSquash commitgit rebase -i (squash)
zUndogit reflog + reset
nNew branchgit checkout -b
?Help (show all keys)man git

lazygit vs. Other Git UIs

There are plenty of git GUIs — GitKraken, SourceTree, GitHub Desktop, Tower. So why a terminal-based tool?

  • Speed. lazygit opens instantly. No Electron app boot time. No loading spinners.
  • Works over SSH. If you're on a remote server, you can't run GitKraken. lazygit works anywhere you have a terminal.
  • Free forever. No paid tiers. No feature gating. Open source under MIT license.
  • Keyboard-first. Once you learn the shortcuts (a few hours), you're faster than any mouse-based GUI.

The trade-off is the learning curve of a TUI. If you've never used a terminal app with panels before, the first 15 minutes feel unfamiliar. After that, it clicks.

Who Should Use lazygit?

  • Developers who live in the terminal — if you already use vim, tmux, or any CLI tools, lazygit fits right in.
  • Anyone who avoids rebase and cherry-pick — these are powerful git operations that most people skip because the syntax is scary. lazygit makes them one-key operations.
  • Teams reviewing code locally — you can browse branches, read diffs, and navigate commit history faster than in a web UI.
  • Anyone who's ever lost work to a bad git command — the undo feature alone is worth the install.

The Bottom Line

Git is one of those tools that punishes you for not memorizing it. lazygit removes that punishment. You still get the full power of git — staging, branching, rebasing, cherry-picking, worktrees — but with a visual interface that shows you what's happening instead of making you guess.

Install it. Run lazygit in any repo. Spend 15 minutes with the ? help screen. You'll wonder why you ever typed git log --oneline --graph --all by hand.

Get lazygit: github.com/jesseduffield/lazygit (free, open source)

Love terminal tools? Check out our 10 Command Line Tools That Will 10x Your Productivity and our free .gitignore Generator.

IT
Salty Deprecated Software Engineer

The IT Hustleの編集用ペンネームで書いています——ノートPC修理技術者、システム管理者、ストレージエンジニア、ソフトウェアエンジニアとしての25年以上の経験を、今はAIエージェントの運用に注いでいます。すべての記事は公開前に人間が確認します。詳しくは編集方針をご覧ください。

ツール一覧全記事私たちについて

最新情報を受け取る

新しいツール、ブログ記事、アップデートをいち早くお届けします。スパムなし。

独自の反ハルシネーション プロンプトを生成する

AIプロンプトエンジンは独自技術を使い、内蔵の検証・矛盾テスト付きプロンプトを生成します。

無料で3回試す →

会社情報

  • 概要
  • 実践マニュアル
  • AI用語集
  • 筆者について
  • お問い合わせ

プロダクト

  • ツール
  • 料金ウォッチ
  • エージェントオプス
  • コード
  • デザイン
  • システム管理
  • 生産性
  • マーケティング
  • ビジネス

法的情報

  • プライバシーポリシー
  • 利用規約
  • 免責事項
  • 編集方針
  • 訂正について

© 2026 Salty Rantz LLC. 無断複製・転載を禁じます。

テクノロジーの変革を乗り越える人々のために。