IDE

Terminal Git UI Tools Guide

Explore terminal-based Git UI tools like lazygit and tig that bring visual Git operations right into your terminal.

Who This Is For
  • Developers who want to improve Git efficiency in their IDE
Prerequisites
  • Basic Git command knowledge
Common Risks
  • Relying on IDE operations without understanding underlying Git behavior

Overview

Terminal Git UI tools bring visual Git operations into your terminal without switching to a separate GUI application. They combine terminal speed with visual convenience.

lazygit

lazygit is one of the most popular terminal Git UIs, written in Go and available on all major platforms.

Installation

# macOS
brew install lazygit

# Linux (Debian/Ubuntu)
sudo add-apt-repository ppa:lazygit-team/release
sudo apt-get update
sudo apt-get install lazygit

# Launch
lazygit

Core Features

FeatureKeyDescription
Stage/UnstageSpaceToggle file stage state
CommitcCreate commit
Switch branchbView and switch branches
MergemMerge into current branch
RebaserInteractive rebase
StashsStash changes
PushPPush to remote
LoglView commit log
DiffEnterView file diff

Typical Workflow

cd my-project
lazygit

# Main panels (navigate with left/right arrows):
# - Status
# - Files
# - Branches
# - Commits
# - Stash

tig

tig is an ncurses-based text-mode interface for Git, focused on efficient log viewing and diff browsing.

Installation

# macOS
brew install tig

# Linux
apt-get install tig

Core Commands

tig                  # Commit log view
tig log --oneline    # Compact log
tig diff             # Diff view
tig blame file.js    # Blame view
tig status           # Status view

Shortcuts

KeyFunction
j/kMove up/down
EnterView selected commit
/Search
mView branch refs
tToggle tree view

Choosing a Tool

NeedRecommended
Daily commit and stagelazygit
Browsing history and difftig
Interactive rebaselazygit
Blame trackingtig
Full GUI experiencelazygit

Notes

  1. Terminal UI tools invoke Git commands under the hood — they don't change Git's behavior
  2. Understanding the underlying commands is recommended before relying on UI tools
  3. Conflict resolution still requires understanding Git's merge mechanism

Continue Learning

  1. ide/github-desktop — GitHub Desktop guide
  2. ide/vscode-git — Git in VS Code
  3. commands/git-log — git log command reference