LazyGit
Back to Development
LazyGitAdvanced14 min

LazyGit Rebase and Conflict Resolution: A Visual Guide to Interactive Rebasing

Interactive Rebase, Visually

Master interactive rebasing in LazyGit. Learn to reorder, squash, and split commits visually, then resolve merge conflicts without leaving the TUI.

LazyGit gives Git a visual interface in the terminal. Stage individual lines, resolve rebase conflicts visually, and never type git add -p again.

By the end of this 14 min guide, you'll have a working Lazygit setup and practical LazyGit workflows you can use immediately.

Rebase Prerequisites & Git Basics

Install Lazygit:

brew install lazygit
Tip: Verify the installation with lazygit --version or lazygit -V after installing.

Rebasing Inside LazyGit

Run lg in any repo. Five panels — Status, Files, Branches, Commits, Stash — with vim-style navigation. The bottom bar shows context-aware keys.

Here's a foundational configuration to start with:

# config.yml
gui:
mouseEvents: true
showIcons: true
customCommands:
- key: "C"
command: "git commit --amend --no-edit"
context: "files"

Conflict Resolution UI

With Lazygit configured, these LazyGit-specific workflows will save you time every day:

Pro tip: Don't try to adopt everything at once. Start with Space stage/unstage files or hunks and add more as it becomes habit.

Squash, Reorder & Drop Commits

Once you're comfortable with Lazygit basics, these advanced techniques will transform your LazyGit workflow:

Rebase Mistakes & Undo

Here are the most common Lazygit issues and how to fix them:

Rebase with Confidence

Congratulations — you now have a solid Lazygit foundation. Here's where to go next:

← PreviousLazyGit Custom Commands and Keybindings: Extend Your Git TUINext →Obsidian Daily Notes and Templates: Build a Frictionless Journaling Workflow