lazygit is a simple terminal UI for git commands. It provides an intuitive interface for staging changes, managing branches, and viewing diffs without memorizing git commands.
📑 Table of Contents
Key Features
- Visual Staging: Stage hunks and lines
- Branch Management: Easy switching and merging
- Interactive Rebase: Visual rebase editing
- Stash Support: Quick stash operations
- Customizable: Keybindings and themes
Installation
Install lazygit:
# Via snap
sudo snap install lazygit
# Via brew
brew install lazygit
# Via apt (Ubuntu)
LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep tag_name: | sed -E 's/.*"v*([^"]+)".*/\1/')
curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
sudo tar xf lazygit.tar.gz -C /usr/local/bin lazygit
Usage Examples
lazygit operations:
# Launch in repository
lazygit
# Key bindings
space # Stage/unstage file
c # Commit
p # Push
f # Fetch
m # Merge
r # Rebase
s # Stash
? # Show keybindings
Benefits
lazygit makes Git accessible without sacrificing power. Its visual interface speeds up common operations while maintaining full Git functionality.
Was this article helpful?