Repository navigation
Commands Workspace and Changes
github-actions[bot] edited this page Oct 18, 2026
·
2 revisions
Commands for opening folders, reading status, staging, committing, diffs, conflicts, stashes and the shelf. How to read the columns, the events and the channels are explained in Commands and Events.
| Command | Wrapper | Returns | Kind | What it does |
|---|---|---|---|---|
get_launch_mode |
getLaunchMode() |
LaunchMode |
app | app mode (optional folder) or mergetool mode |
open_repo |
openRepo(repoPath) |
RepoInfo |
git2 | finds the repository containing a path |
open_workspace |
openWorkspace(folderPath) |
WorkspaceInfo |
file | opens a folder and scans it for repositories |
discover_repositories |
discoverRepositories(workspaceRoot) |
RepoInfo[] |
file | rescans one folder (Scan for Repositories, reposChanged) |
init_repository |
initRepository(folderPath) |
RepoInfo |
CLI |
git init in a plain folder |
watch_workspace |
watchWorkspace(workspaceRoot, repoRoots) |
void |
app | starts the file watcher for one folder, off the main thread |
unwatch_workspace |
unwatchWorkspace(workspaceRoot) |
void |
app | stops it, also off the main thread |
watch_open_files |
watchOpenFiles(filePaths) |
void |
app | the files open in the window's tabs, reported even when git ignores them |
read_workspace_file |
readWorkspaceFile(filePath) |
WorkspaceFile |
file | reads a .nibtree-workspace or .code-workspace file |
write_workspace_file |
writeWorkspaceFile(filePath, folders) |
void |
file | saves the folders atomically, keeping other keys, entries and comments |
options is CommitOptions | null (sign-off, author, GPG signing, skip hooks); null commits with the defaults.
| Command | Wrapper | Returns | Kind | What it does |
|---|---|---|---|---|
get_status |
getStatus(repoPath) |
RepoStatus |
git2 | HEAD and upstream, the operation in progress, changed files and submodules |
get_head_message |
getHeadMessage(repoPath) |
string |
git2 | the last commit message, for amend |
stage_files |
stageFiles(repoPath, filePaths) |
void |
CLI | git add -A |
unstage_files |
unstageFiles(repoPath, filePaths) |
void |
CLI |
git restore --staged, or git rm --cached before the first commit |
discard_files |
discardFiles(repoPath, trackedPaths, untrackedPaths) |
void |
CLI |
git restore --worktree; deletes untracked files |
stage_content |
stageContent(repoPath, filePath, content, eol) |
void |
CLI | writes text into the index (hunk staging) |
write_worktree_file |
writeWorktreeFile(repoPath, filePath, content, eol) |
void |
file | overwrites a work tree file |
commit |
commit(repoPath, message, amend, options) |
GitOutput |
CLI |
git commit -F -, optionally --amend
|
commit_all |
commitAll(repoPath, message, amend, options) |
GitOutput |
CLI |
git commit --all: every tracked change; untracked files stay out |
commit_files |
commitFiles(repoPath, filePaths, message, amend, options) |
GitOutput |
CLI |
git commit --only these files; other staged changes stay staged |
undo_last_commit |
undoLastCommit(repoPath) |
string |
CLI |
git reset --soft HEAD~1; returns the undone message |
rollback_files |
rollbackFiles(repoPath, filePaths, deleteAdded) |
void |
CLI | Rollback: tracked files back to HEAD; added files are unstaged, and deleted when asked |
| Command | Wrapper | Returns | Kind | What it does |
|---|---|---|---|---|
get_file_diff |
getFileDiff(repoPath, filePath, origPath, area) |
FileDiff |
git2 | both sides of a staged or unstaged change |
get_commit_file_diff |
getCommitFileDiff(repoPath, commitId, filePath, origPath) |
FileDiff |
git2 | both sides of one file in a commit |
revisions_file_diff |
revisionsFileDiff(repoPath, fromRevision, toRevision, filePath, origPath) |
FileDiff |
git2 | one file between two revisions (branch compare tabs) |
compare_with_revision |
compareWithRevision(repoPath, filePath, revision) |
RevisionDiff |
git2 | the file at a revision against the work tree copy |
| Command | Wrapper | Returns | Kind | What it does |
|---|---|---|---|---|
list_conflicts |
listConflicts(repoPath) |
ConflictSummary |
git2 | the operation in progress and every conflicted file |
load_conflict |
loadConflict(repoPath, conflictPath, ignoreWhitespace) |
MergeDocument |
git2 | base, ours, theirs and chunks |
save_resolution |
saveResolution(repoPath, conflictPath, content, eol) |
void |
CLI | writes the result, then git add
|
accept_side |
acceptSide(repoPath, conflictPaths, side) |
void |
CLI | takes ours or theirs for whole files, or removes them |
continue_operation |
continueOperation(repoPath) |
OpOutcome |
CLI |
--continue for the merge, rebase, cherry-pick or revert |
abort_operation |
abortOperation(repoPath) |
OpOutcome |
CLI |
--abort for the same |
skip_rebase_commit |
skipRebaseCommit(repoPath) |
OpOutcome |
CLI | git rebase --skip |
These only work when the app was started as git mergetool. See How Mergetool Mode Works.
| Command | Wrapper | Returns | Kind | What it does |
|---|---|---|---|---|
load_mergetool |
loadMergetool(ignoreWhitespace) |
MergeDocument |
file | reads BASE, LOCAL, REMOTE and MERGED |
save_mergetool |
saveMergetool(content, eol) |
void |
file | writes MERGED and exits with status 0 |
cancel_mergetool |
cancelMergetool() |
void |
app | exits with status 1 |
| Command | Wrapper | Returns | Kind | What it does |
|---|---|---|---|---|
get_stashes |
getStashes(repoPath) |
StashEntry[] |
git2 | the stash list |
stash_push |
stashPush(repoPath, message, includeUntracked) |
void |
CLI |
git stash push; error "No local changes to stash" if nothing was stashed |
stash_apply |
stashApply(repoPath, stashIndex, pop) |
OpOutcome |
CLI |
git stash apply, or pop
|
stash_drop |
stashDrop(repoPath, stashIndex) |
void |
CLI | git stash drop |
stash_clear |
stashClear(repoPath) |
void |
CLI |
git stash clear; the UI confirms first |
Shelved changes are patches in <git dir>/nibtree-shelf/. See How the Shelf Works.
| Command | Wrapper | Returns | Kind | What it does |
|---|---|---|---|---|
shelve_changes |
shelveChanges(repoPath, name, filePaths, keepInWorkingTree) |
ShelfEntry |
CLI | saves the files' changes as a patch, then reverts them unless kept |
list_shelf |
listShelf(repoPath) |
ShelfEntry[] |
file | every shelved change list |
unshelve |
unshelve(repoPath, shelfId, filePaths, removeFromShelf) |
OpOutcome |
CLI |
git apply of all files (filePaths null) or some, 3-way when it does not fit |
shelf_file_diff |
shelfFileDiff(repoPath, shelfId, filePath) |
ShelfFileDiff |
file | both sides of one shelved file, for Show Diff |
rename_shelf |
renameShelf(repoPath, shelfId, name) |
ShelfEntry |
file | renames a change list |
delete_shelf |
deleteShelf(repoPath, shelfId) |
void |
file | deletes it for good; the UI confirms first |
| Command | Wrapper | Returns | Kind | What it does |
|---|---|---|---|---|
add_to_ignore |
addToIgnore(repoPath, patterns, target, filePaths) |
IgnoreOutcome |
file | appends new patterns to .gitignore or .git/info/exclude, reports tracked matches |
ensure_ignore_file |
ensureIgnoreFile(repoPath, target) |
string |
file | the ignore file's absolute path, created empty when missing (Edit .gitignore) |
untrack_files |
untrackFiles(repoPath, filePaths) |
void |
CLI |
git rm --cached, so ignored files stop being tracked |
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