The terminal waits, blinking. One command decides whether your branch history stays clean or dissolves into chaos: git rebase. Pair it with lnav, and you gain an immediate, searchable window into your logs—both commit history and operational events—without leaving the shell.
Git Rebase rewrites history by moving commits to a new base. It keeps your project linear, reducing merge conflict noise. The most powerful use is interactive mode:
git rebase -i main
Here, you can squash, reword, or drop commits before they ever land in the mainline. Cleaner history makes it easier to review and debug later. But if you rebase without visibility, you risk losing context. That’s where Lnav changes the game.
Lnav (Log Navigator) parses and indexes plain text logs in real time. It supports filters, SQL queries, and time-based navigation right inside your terminal. After a rebase, you can instantly inspect your git logs or related system logs: