Code and git
Git with lazygit
How lazygit fits into Herdr as a popup, and Dave's config with GitHub-style diffs and a color per agent branch.
Lazygit replaces the diff view and the source control panel from Cursor. In Herdr it opens as a popup over the pane you are in, on the repo of that pane. Read the diff, stage, commit, press q, and you are back.
How it works
Lazygit is a terminal UI for git. Run lazygit inside a repo and you get panels for status, files, branches, commits, and stash, with the diff on the right. Every action has a single key, and ? lists them.
Lazygit works with no config. The config file lives here:
| OS | Path |
|---|---|
| macOS | ~/Library/Application Support/lazygit/config.yml |
| Linux | ~/.config/lazygit/config.yml |
| Windows | %LOCALAPPDATA%\lazygit\config.yml |
Three parts of it matter:
gui.sidePanelsdecides which panels show and in what order.gui.branchColorPatternscolors branch names by a regex on the name.git.diffRendererslets you replace the plain git diff with a tool like delta, which adds syntax highlighting and line numbers.
The popup binding is on the keyboard page. It runs cd "$HERDR_ACTIVE_PANE_CWD" && exec lazygit in a floating window. q closes lazygit, and the popup with it.
Dave's setup
brew install lazygit git-delta batdelta uses the bat syntax theme. Set it once in your shell config. On Windows, set the BAT_THEME environment variable in System Settings instead.
export BAT_THEME="TwoDark"The config shows status, files, and stash only. Branches and commits sit behind the stash panel as tabs, and ] reaches them. Every agent commits on its own branch prefix, so the colors tell you who made a branch. delta renders the diff with GitHub-style colors.
gui:
showCommandLog: false
showBottomLine: false
showPanelJumps: false
showRandomTip: false
showListFooter: false
showNumstatInFilesView: true
showFileTree: true
sidePanelWidth: 0.3
shrinkSidePanelsToContent: true
expandFocusedSidePanel: true
expandedSidePanelWeight: 8
splitDiff: auto
nerdFontsVersion: "3"
tabWidth: 4
# Narrow panes: file list on top, diff full width.
portraitMode: auto
portraitModeAutoMaxWidth: 110
portraitModeAutoMinHeight: 30
# Status, files, stash. Branches and commits are tabs on stash.
sidePanels:
- [status]
- [files]
- [stash, branches, commits]
# One color per author. Agents commit on their own prefix.
branchColorPatterns:
"^me/": "#5fd7ff"
"^codex/": "#c678dd"
"^claude/": "#e5c07b"
"^grok/": "#00e5a8"
"^cursor/": "#61afef"
"^feat/": "#98c379"
"^fix/": "#e06c75"
"^main$": "#98c379"
git:
log:
showGraph: never
autoFetch: true
autoRefresh: true
diffContextSize: 3
diffRenderers:
# Unified diff with syntax colors and line numbers. Press | to switch.
- name: delta
command: >-
delta --dark --paging=never --true-color=always --syntax-theme=TwoDark
--tabs=4 --relative-paths
--file-style="bold #abb2bf" --file-decoration-style="#3e4452 ul"
--hunk-header-style="line-number syntax"
--hunk-header-decoration-style="#3e4452 ul"
--hunk-header-line-number-style="#61afef"
--line-numbers
--line-numbers-left-format="{nm:>3} " --line-numbers-right-format="{np:>3} │ "
--line-numbers-left-style="#5c6370" --line-numbers-right-style="#5c6370"
--line-numbers-zero-style="#5c6370"
--line-numbers-minus-style="#e06c75" --line-numbers-plus-style="#98c379"
--minus-style="syntax #49282e" --minus-emph-style="syntax #753235"
--plus-style="syntax #243d2f" --plus-emph-style="syntax #2b5c37"
# Plain git with word-level coloring, for prose and markdown.
- type: rawGit
args: [--color-words]
name: color-words
# Checkout by name from the files panel. Type to filter, Enter checks out.
customCommands:
- key: b
context: "files, status, stash"
description: "Checkout branch"
loadingText: "Checking out"
prompts:
- type: input
title: "Checkout:"
key: Branch
suggestions:
preset: branches
command: git checkout {{.Form.Branch | quote}}
# Esc goes back in nested views. At the top level it quits, which closes the Herdr popup.
quitOnTopLevelReturn: true
disableStartupPopups: true
update:
method: neverCheck
Press Cmd+Shift+G in a repo with uncommitted changes. The popup shows the changed files on the left and a highlighted diff on the right. Press q to close it.