Druk surfaces git information at every level of the UI without requiring any setup beyond havingDocumentation 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.
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
| Badge | Meaning |
|---|---|
M | Modified |
A | Added (new file) |
U | Untracked |
D | Deleted |
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
PressCtrl+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.
Browse changes
Use
↑ / ↓ to walk through the list of changed files. The diff for the file under the cursor opens automatically beside the panel.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.Commit
Press
c to open the commit flow: pick which files to include, type your message, and confirm.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.| Key (in source-control panel) | Action |
|---|---|
↑ / ↓ | Walk changed files |
Tab | Step into diff / toggle inline ↔ split |
Esc | Close diff / return to file tree |
c | Commit (pick files + write message) |
p | Push |
b | Switch branch |
B | Compare current branch against another |
Diff Layout
ThediffView setting controls how diffs are laid out when you step into the diff page:
| Setting value | Layout |
|---|---|
"inline" (default) | Added and removed lines interleaved in a single column |
"split" | Old version on the left, new version on the right |
F1 → Settings) or in ~/.config/druk/config.json.
Panel View
ThegitPanelView setting controls how changed files are listed in the source-control panel:
| Setting value | Layout |
|---|---|
"tree" (default) | Files nested under their parent folders |
"list" | All changed files as a flat list of relative paths |
Branch Comparison
PressB 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 underGit → 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.
Git. Pull uses --ff-only; if the branches have diverged you will need to merge or rebase in an external terminal.