Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/letstri/druk/llms.txt

Use this file to discover all available pages before exploring further.

Druk surfaces git information at every level of the UI without requiring any setup beyond having git on your PATH. Changed lines appear in the editor gutter and in a minimap beside the scrollbar. Files in the tree carry status badges. The status bar tracks your branch and how far it sits from upstream. A dedicated source-control panel lets you review diffs, pick files to stage, write a commit message, and push — all without leaving the terminal.
Druk never runs a git command that talks to a remote unless you explicitly trigger push, fetch, or pull. No credential prompts appear behind the editor.

Gutter Marks and Scrollbar Map

Every line changed since the last commit is marked in the editor gutter with a colored indicator:
  • Added lines — green bar on the left edge
  • Modified lines — orange / yellow bar
  • Deleted lines — a small triangle marker at the deletion point
The same marks appear beside the scrollbar on the right, giving you a whole-file change map at a glance. A mark in the scrollbar is a place to scroll to. Files in the file tree carry one-letter badges:
BadgeMeaning
MModified
AAdded (new file)
UUntracked
DDeleted
The status bar shows the current branch together with the upstream distance:
⎇ main ↑2 ↓1 ~3
This reads as: on main, 2 commits ahead of origin, 1 commit behind, 3 files changed in the working tree.

Auto-Refresh

Druk watches the filesystem and refreshes all git state — gutter marks, tree badges, branch name, and ahead/behind counts — automatically. Work you do in another terminal window (a commit, a checkout, a stash) shows up in the UI without restarting Druk.

Source-Control Panel

Press Ctrl+Opt+G to swap the sidebar for the source-control panel. The panel shows all changed files grouped under the branch name, mirroring the VS Code source-control experience.
1

Browse changes

Use / to walk through the list of changed files. The diff for the file under the cursor opens automatically beside the panel.
2

Read the diff

Press Tab to step into the diff page. Press Tab again to toggle between inline and split layout. Press Esc to close the diff and return to the panel.
3

Commit

Press c to open the commit flow: pick which files to include, type your message, and confirm.
4

Push

Press p to push the current branch to its upstream. If the branch has never been pushed, Druk runs git push --set-upstream origin <branch> automatically.
5

Switch branch

Press b to open the branch picker and switch to another branch.
6

Return to the file tree

Press Esc to close the source-control panel and bring the file tree back.
Key (in source-control panel)Action
/ Walk changed files
TabStep into diff / toggle inline ↔ split
EscClose diff / return to file tree
cCommit (pick files + write message)
pPush
bSwitch branch
BCompare current branch against another

Diff Layout

The diffView setting controls how diffs are laid out when you step into the diff page:
Setting valueLayout
"inline" (default)Added and removed lines interleaved in a single column
"split"Old version on the left, new version on the right
Change it from the Settings page (F1Settings) or in ~/.config/druk/config.json.

Panel View

The gitPanelView setting controls how changed files are listed in the source-control panel:
Setting valueLayout
"tree" (default)Files nested under their parent folders
"list"All changed files as a flat list of relative paths

Branch Comparison

Press B in the source-control panel (or use Git → Compare branches in the palette) to compare the current branch against another. Druk finds the merge base of the two branches and shows every file that diverges from that point to the tip of the selected branch — exactly the set of changes unique to that branch. This is also available as Git → Compare against branch… in the command palette, which lets you point the whole editor at a different branch. When a compare branch is active, gutter marks, tree badges, and the source-control panel all reflect differences against that branch’s tip instead of HEAD. To clear the comparison and return to HEAD, use Git → Compare against HEAD in the palette.

Diff Current File

Git → Diff current file in the command palette (command id git.diffFile) opens the source-control panel pre-focused on the file you are editing, so you can jump straight into its diff without scrolling the list.

Branch Operations

All branch operations are available in the command palette under Git → Branch, and the most common ones are accessible directly from the source-control panel.

Switch branch

Check out an existing local or remote branch. Switching to a remote-tracking branch (origin/feat) creates a local tracking branch automatically.

New branch

Create a new branch off the current HEAD and switch to it immediately.

New branch from…

Pick any branch as the starting point for a new branch — useful for feature branches off a release branch.

Merge branch

Merge another branch into the current one. Druk passes --no-edit so no external editor is needed for the commit message.

Rename branch

Rename any local branch.

Delete branch

Delete a local branch. Git refuses branches with unmerged commits unless you use Delete branch (force).

Undo last commit

Runs git reset --soft HEAD~1 — the commit disappears but its changes stay staged.

Stash / Stash pop

Stash all working-tree changes (including untracked files) or pop the most recent stash entry.
Additional remote operations — Fetch and Pull (fast-forward only) — are also in the palette under Git. Pull uses --ff-only; if the branches have diverged you will need to merge or rebase in an external terminal.

Build docs developers (and LLMs) love