Repository navigation
Diffs
A diff shows two versions of a file side by side, with the differences highlighted. A colored band joins each change's lines across the sides, through the line numbers, so you see where a block came from and where it went. Each side scrolls on its own, and the other follows to keep matching lines level. Use it to check your work before you commit, and to stage only some of the changes in a file.

A side-by-side diff of cart.ts: the toolbar, the Index and Working Tree labels, folded unchanged lines and a band for each change.
- Open Changes (Shift+Cmd+G).
- Click a file.
The diff opens in the Diff tab in the editor area. Use the Up and Down arrow keys in the Changes list to step through files; the diff follows. The right end of the toolbar shows the file name and its folder (with the repository in front when there are several).
The diff updates by itself when the file changes, and keeps its scroll position. With no file selected, the area says Select a file in Changes to see its diff (with a Show Changes button when the sidebar is hidden), or Resolve conflicts to continue while any file has a conflict.
Which two versions you see depends on the group you clicked:
- A file under Changes: the left side is the Index (what is staged, or the last commit when nothing is staged) and the right side is the Working Tree (the file on disk now).
- A file under Staged: the left side is HEAD (the last commit) and the right side is Index (staged).
Commits in the Log use the same view, read-only, comparing the commit with its parent. So do commit tabs, the compare tabs of the Git menu and the Branches popup, and shelved changes.
To see both versions in one column instead, click Inline in the toolbar. See Inline Diffs.
- Old lines are soft red on the left and new lines green on the right, and the changed words are stronger.
- The strip next to the scrollbar has a tick for every change. Click a tick to jump there.
The toolbar above the diff has:
- Up and Down arrows for the previous and next change. F7 and Shift+F7 do the same while the diff has focus. After the last change they wrap to the first.
- A counter such as 1 of 2, or 2 changes when none is picked, or No changes.
When you open a diff it jumps to the first change.

The line between the sides, highlighted under the pointer, with the left side made narrower.
The two sides start equally wide. To give one side more room, drag the line between them (the pointer turns into a resize arrow when you are on it). The labels above the sides and the find bars follow.
- Double-click the line to make the sides equal again.
- With the line focused, the Left and Right arrow keys move it in small steps, and Shift with an arrow in bigger steps.
- Each side keeps at least 15% of the width.
Three panes (Staging View, Merge Tool) resize the same way: drag the edge of a column of bands.
The split is remembered and used for every diff, in Changes, the Log and diff tabs alike. The column of change buttons between the sides keeps its width.
Click into one side and press Cmd+F. That side's find bar opens above the diff, so the two sides stay lined up while you search. The sides are read-only, so there is no Replace row. See Find and Replace.
Collapse unchanged (on by default) folds long runs of lines that are the same on both sides, keeping three lines of context around each change. A folded run shows as a wavy line named after the code below it, such as Cart > remove() (or 23 unchanged lines outside a class or function). At its left, 10 more from the top and 10 more from the bottom open its ends; a click elsewhere shows it all. Turn the button off to see the whole file. Nibtree remembers your choice for every diff.
You do not have to stage a whole file. Each change (a "hunk", one block of changed lines) has its own button beside its line numbers.

The diff toolbar at 1 of 2, and the first change with its « button beside its line number.
- In a diff from Changes, « (Stage this change) copies that one change into the index. The curved arrow next to it reverts the change (Revert a Change).
- In a diff from Staged, » (Unstage this change) takes that one change out of the index.
Example: in src/cart.ts you fixed a bug and also added a debug log. Stage only the fix, commit it, and keep the log for later.
The file may then appear in both Staged and Changes until every part is staged.
The Blame button in the diff toolbar shows who last changed each line on the right side, and when. See Blame. It uses the same setting as the Blame button in the editor.
Open File, after Blame in the toolbar, opens the real file from your working tree in an editor tab, so you can edit it. When the right side is the working tree (unstaged changes, Compare with Working Copy, Show Diff with Working Tree), the file opens at the line your cursor is on, or at the top line you were looking at. In other diffs, such as a commit in the Log or a branch comparison, it opens at the top. If the file no longer exists in the working tree, a message says so.
A changed image or PDF shows its old version on the left and the new one on the right, under the same labels as a text diff. Both images zoom and scroll together. See Image and PDF Preview.

The logo in the last commit on the left and the bigger one in the working tree on the right, with their sizes.
- No content changes: the file changed in a way that is not text, for example only its permissions.
- Binary file, no text diff: binary files that are not images or PDFs are not compared.
- File too large to diff: very large files are skipped to keep the app fast.
- Stored in Git LFS: for a file kept in Git LFS, the diff shows the old and new sizes instead of text. See Git LFS.
Diffs and the merge tool never wrap long lines, so both sides stay aligned. Scroll sideways for long lines. The Line spacing and Render whitespace settings apply here too (see Editing Code).
These pages are generated from docs/wiki. To correct something, open a pull request against the source file; edits made here are overwritten.
Using Nibtree
- Getting Started
- Welcome Screen
- Workspaces
- Files Panel
- File Operations
- File Icons
- Rounded Panels
- Editor and Tabs
- Pin Reorder and Wrap Tabs
- Single Tab Title
- Split Editor
- New File and Unsaved Changes
- Unload Hidden Tabs
- Editing Code
- Code Appearance
- Markdown Editor
- Image and PDF Preview
- Search Everywhere
- Recent Files
- Navigation Bar
- Find and Replace
- Changes and Commits
- Sign In Prompts
- Commit Box Layout
- Repository Actions
- Commit Options
- Ignoring Files
- Diffs
- Inline Diffs
- Staging View
- Revert a Change
- Resolving Conflicts
- Merge Tool
- Blame
- History and Log
- Merge Commits
- Branches and Tags
- Branches Popup
- Remotes
- Stashes
- Shelf
- Git Menu
- Git Dialogs
- Interactive Rebase
- Worktrees
- AI Agents
- AI Tasks
- AI Usage
- Keep Computer Awake
- Submodules
- Git LFS
- GitHub
- Git Console
- Terminal
- Terminal Features
- Scripts
- Navigation
- Menus
- Settings
- Settings Search
- Color Themes
- Settings Terminal and Automation
- Settings Files
- Updates
- Status Bar and Help
- Notifications
- Memory Use
- Clear Cache
- MCP and CLI
- Git Mergetool
- Keyboard Shortcuts
- Keyboard Shortcuts Editor
- Troubleshooting
- Troubleshooting Git
Developers
- Developer Guide
- Architecture
- Project Layout
- Backend
- How Folder Watching Works
- Folder Watching Bugs We Fixed
- How Workspace Files Work
- How the Preview Scheme Works
- Backend Services
- How Terminal Features Work
- Terminal Bugs We Fixed
- Frontend
- How the Rich Markdown Editor Works
- Rich Markdown Bugs We Fixed
- Git Menu Links
- Menu Keys and Routing
- Frontend Modules
- Blame Bugs We Fixed
- Project Color And Title Bar
- One Diff View
- Diff Bugs We Fixed
- Merge Tool Layouts
- Merge Tool Bugs We Fixed
- Color Theme Bugs We Fixed
- How the Connected Diff Works
- Rounded Panels Bugs We Fixed
- Update Bugs We Fixed
- Status Bar Bugs We Fixed
- MCP and CLI Bugs We Fixed
- Repository Actions Bugs We Fixed
- How the Changes Tab Works
- CodeMirror Patterns
- How the Cursor Works
- How Editor Features Work
- How the Path Bar Works
- Commands and Events
- Settings Reference
- Commands Workspace and Changes
- Commands Branches and Remotes
- Commands History and Extras
- Commands App and Tools
- Testing
- Test Suites
- Debugging
- Debugging with MCP
- Measuring Setting Memory
- How Terminal Memory Is Measured
- How Markdown Diagrams Work
- Releases and CI
- Publishing the Wiki
- Versioning and Changelog
- Browser Version Packages
- Browser Release Checks
- Docker Image
- Platforms and Signing
- Windows Support
- Windows Bugs We Fixed
- Windows MCP and CLI
- Docs and Screenshots
- UI Library
- UI Library MCP
- UI Library Bugs
- UI Library Migration
- Contributing
How features work
- Welcome screen
- Workspaces and folders
- Files panel
- File operations
- File icons
- Editor and tabs
- Pin, reorder and wrap tabs
- Single tab title
- Split editor
- New File and unsaved changes
- Unload hidden tabs
- Editing code
- Code appearance
- Markdown editor
- Image and PDF preview
- Search Everywhere
- Recent Files
- Navigation Bar
- Find and replace
- Changes and commits
- Sign-in prompts
- Commit box layout
- Repository actions
- Commit options
- Ignoring files
- Diffs
- Inline diffs
- Staging view
- Revert a change
- Resolving conflicts
- Merge tool
- Blame
- History and log
- Merge commits
- Commit tabs
- Branches and tags
- Branches popup
- Remotes
- Stashes
- Shelf
- Git menu
- Git dialogs
- Interactive rebase
- Worktrees
- AI agents
- AI usage
- Keep computer awake
- AI tasks
- Submodules
- Git LFS
- GitHub account
- Git Console
- Back and Forward
- Integrated terminal
- Scripts tool window
- Menu bar
- Settings
- Search in Settings
- Color themes
- Rounded panels
- Updates and release channels
- Status bar and help links
- Notifications
- Memory readout and memory log
- Clear Cache
- MCP server and command line tool
- git mergetool mode