Repository navigation
Commands Branches and Remotes
Commands for branches, merging and rebasing, the network, remotes, clone, patches and tags. How to read the columns, the events and the channels are explained in Commands and Events. Most of these back the Git menu, see How the Git Menu Works.
| Command | Wrapper | Returns | Kind | What it does |
|---|---|---|---|---|
get_refs |
getRefs(repoPath) |
Refs |
git2 | local and remote branches, tags and remotes |
checkout_branch |
checkoutBranch(repoPath, branchName) |
void |
CLI | git switch |
checkout_remote_branch |
checkoutRemoteBranch(repoPath, remoteBranch, localName) |
void |
CLI | switches to or creates a tracking branch |
create_branch |
createBranch(repoPath, branchName, startPoint, checkout) |
void |
CLI |
git switch -c or git branch
|
rename_branch |
renameBranch(repoPath, branchName, newName) |
void |
CLI | git branch -m |
delete_branch |
deleteBranch(repoPath, branchName, force) |
void |
CLI |
git branch -d, or -D when forced |
merge_branch |
mergeBranch(repoPath, branchName) |
OpOutcome |
CLI |
git merge --no-edit into the current branch |
rebase_onto |
rebaseOnto(repoPath, branchName) |
OpOutcome |
CLI |
git rebase onto the branch |
| Command | Wrapper | Returns | Kind | What it does |
|---|---|---|---|---|
update_branch |
updateBranch(repoPath, branchName) |
OpOutcome |
CLI | fetches and fast-forwards a branch that is not checked out (git fetch <remote> <upstream>:<branch>) |
push_branch |
pushBranch(repoPath, branchName) |
OpOutcome |
CLI | pushes a local branch to its upstream, or publishes and tracks it |
set_branch_upstream |
setBranchUpstream(repoPath, branchName, upstream) |
void |
CLI | git branch --set-upstream-to |
unset_branch_upstream |
unsetBranchUpstream(repoPath, branchName) |
void |
CLI | git branch --unset-upstream |
compare_branches |
compareBranches(repoPath, branchName, baseName) |
BranchComparison |
git2 | commits only each side has, and the files that differ |
compare_with_worktree |
compareWithWorktree(repoPath, revision) |
WorktreeComparison |
git2 | files that differ between a revision and the work tree |
| Command | Wrapper | Returns | Kind | What it does |
|---|---|---|---|---|
merge_with_options |
mergeWithOptions(repoPath, branchName, options) |
OpOutcome |
CLI |
git merge with MergeOptions (no fast-forward, fast-forward only, squash, no commit, message, no verify) |
rebase_with_options |
rebaseWithOptions(repoPath, options) |
OpOutcome |
CLI |
git rebase with RebaseOptions (onto, upstream, branch, rebase merges, keep empty, root, update refs) |
rebase_plan |
rebasePlan(repoPath, fromCommit) |
RebasePlan |
git2 | the commits an interactive rebase from a commit (included) to HEAD rewrites |
rebase_plan_onto |
rebasePlanOnto(repoPath, upstream) |
RebasePlan |
git2 | the commits of upstream..HEAD, for the Rebase dialog's interactive option |
interactive_rebase |
interactiveRebase(repoPath, base, entries, autostash) |
OpOutcome |
CLI |
git rebase -i with the dialog's todo, oldest first; base null rebases from the root |
See How Interactive Rebase Works for the todo, including merge commits.
| Command | Wrapper | Returns | Kind | What it does |
|---|---|---|---|---|
fetch_all |
fetchAll(repoPath) |
OpOutcome |
CLI |
git fetch --all --prune (Fetch All Remotes) |
fetch |
fetch(repoPath, prune) |
OpOutcome |
CLI |
git fetch with no remote named (the branch's remote), optionally pruning |
pull |
pull(repoPath, rebase) |
OpOutcome |
CLI |
git pull, --rebase when asked |
push |
push(repoPath, force) |
OpOutcome |
CLI |
git push, --force-with-lease when forced, sets the upstream on first push |
push_tags |
pushTags(repoPath) |
OpOutcome |
CLI | pushes every local tag to the branch's remote |
pull_with_options |
pullWithOptions(repoPath, remoteName, branchName, mode, noCommit) |
OpOutcome |
CLI | the Pull dialog: mode is merge, rebase or ffOnly; null names pull the upstream |
push_with_options |
pushWithOptions(repoPath, remoteName, remoteBranch, forceWithLease, pushTags) |
OpOutcome |
CLI | the Push dialog: pushes the current branch, tracking it when it has no upstream |
outgoing_commits |
outgoingCommits(repoPath, remoteName, remoteBranch) |
OutgoingCommits |
git2 | the commits a push would send, listed in the Push dialog |
All of them except outgoing_commits send git-progress events while they run, and so do update_branch and push_branch.
| Command | Wrapper | Returns | Kind | What it does |
|---|---|---|---|---|
list_remotes |
listRemotes(repoPath) |
RemoteInfo[] |
git2 | every remote with its fetch and push URLs |
add_remote |
addRemote(repoPath, remoteName, fetchUrl, pushUrl) |
void |
CLI |
git remote add, plus a push URL when given |
edit_remote |
editRemote(repoPath, remoteName, newName, fetchUrl, pushUrl) |
void |
CLI | renames when newName differs, then sets the URLs |
remove_remote |
removeRemote(repoPath, remoteName) |
void |
CLI | git remote remove |
clone_repository |
cloneRepository(url, parentDir, folderName, progress, cancelId) |
string |
CLI |
git clone --progress into an empty or new folder; returns its path |
cancel_git_command |
cancelGitCommand(cancelId) |
boolean |
app | stops the command started with cancelId; the clone fails with "Clone cancelled" |
cancel_git_command uses git/cancel.rs: the command runs in its own process group, so git's helpers stop with it.
| Command | Wrapper | Returns | Kind | What it does |
|---|---|---|---|---|
create_patch |
createPatch(repoPath, source, filePaths, patchPath) |
number |
CLI | writes git diff --binary of staged, unstaged or all changes; returns the file count |
create_commit_patch |
createCommitPatch(repoPath, commitId, patchPath) |
void |
CLI |
git format-patch -1 --stdout of a commit |
apply_patch |
applyPatch(repoPath, patchPath, patchText) |
OpOutcome |
CLI | checks, then applies a file or text; falls back to git apply --3way
|
read_clipboard_text |
readClipboardText() |
string |
app | the clipboard's text, read natively (pbpaste on macOS), for Apply Patch from Clipboard |
The tag list comes with get_refs.
| Command | Wrapper | Returns | Kind | What it does |
|---|---|---|---|---|
create_tag |
createTag(repoPath, tagName, message, commitId) |
void |
CLI | annotated when message has text, lightweight otherwise; at HEAD unless commitId is given |
delete_tag |
deleteTag(repoPath, tagName) |
void |
CLI | deletes a local tag; the remote keeps it |
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