Repository navigation
Worktrees
A worktree is an extra folder that has a different branch of the same repository checked out. Normally a repository has one folder with one branch. With git worktree, you can have main in one folder and feature/login in another at the same time, sharing one history, one set of branches and one .git store. Nothing is cloned twice.
Worktrees are handy when you need to look at or fix another branch without stashing or committing half-done work: a quick bug fix, a review, or a long build on one branch while you keep coding on another.
The first folder, the one with the .git folder inside, is the main worktree. The others are linked worktrees.
Open the Branches and Stashes sidebar (Shift+Cmd+E). Worktrees is the last section, after Stashes. Git > Worktrees > Show Worktrees opens the sidebar with that section expanded.

Each row shows the branch the worktree has checked out (or "detached at" a commit id) and its folder. The worktree you are in has a check mark and bold text. Small tags say more:
- main: the main worktree.
- locked: protected from removal and pruning. Hover it for the reason.
- prunable: its folder is gone. The row is struck through. Pruning makes git forget such a worktree.
The filter box at the top of the sidebar also searches worktree folders and branches.
In the Changes sidebar, a linked worktree opened as a repository has a worktree tag next to its name.
Click + on the Worktrees heading, right-click the heading and choose New Worktree..., or choose Git > Worktrees > New Worktree....

- Choose New branch to create one: type a Branch name and pick where it starts in From. Or choose Existing branch and pick one. Branches already checked out in another worktree are not listed, because git allows a branch in only one worktree at a time.
-
Folder starts as
<repository>-<branch>next to the main worktree, likestorefront-feature-login. It follows the branch name until you edit it. Click Browse... to choose another place. The folder must not exist yet, or be empty. - Tick Open in this window to switch to the new worktree, or Add to workspace to add it as another folder of your workspace. Tick neither to just create it.
- Click Create.
Right-click a worktree row:
- Open in This Window opens its folder as your workspace.
- Add to Workspace adds its folder next to the ones you have open. See Workspaces.
- Reveal in Finder (Reveal in File Explorer on Windows) shows the folder.
- Lock... asks for an optional reason (for example "On a removable disk") and locks it, so git will not prune or remove it. Unlock undoes that. The main worktree cannot be locked.
- Remove... deletes the worktree's folder. The branch stays. You are asked first.
- Prune Stale Worktrees cleans up worktrees whose folder you deleted by hand.
Remove... is disabled for the main worktree, the worktree you are in, a locked one (it reads Remove (unlock first)), and a prunable one (prune it instead).
If the worktree has uncommitted or untracked changes, the question is titled Worktree Has Changes and the button reads Force Remove: those changes are lost. If the worktree is a folder of your workspace, it leaves the workspace first.
If you delete a worktree folder in Finder or File Explorer, git still remembers it, and its branch stays "checked out" there. Choose Prune Stale Worktrees in the section or row menu, or Git > Worktrees > Prune Stale Worktrees. A note says Pruned stale worktrees, or No stale worktrees to prune.
You are in the middle of a change on main in storefront when a bug comes in on fix/tax-rates.
- Click + on the Worktrees heading.
- Choose Existing branch, pick
fix/tax-rates, and leave the folder asstorefront-fix-tax-rates. - Tick Add to workspace and click Create.
- Fix and commit in the new folder. Your work on
mainwas never touched. - Right-click the worktree and choose Remove... when you are done.
- Branches and Tags
- Workspaces
- Shelf, shared by all worktrees of a repository
- How worktrees work (developer)
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