Skip to main content

Command Reference

Open the command palette with ctrl+shift+p and search for Scm. Command names below are the Lua/keymap identifiers; the palette displays their prettified names. Availability depends on the current repository, document, backend, and selected row.

Left-clicking the SCM status item opens a fresh palette filtered to Scm:, without restoring a previous query or selected result. Right-clicking that item opens the project diff.

Repository Commands​

CommandAction
scm:workbenchOpen or focus the repository workbench
scm:repository-toolsOpen backend-specific repository tools
scm:initialize-repositoryInitialize a non-repository directory
scm:project-statusOpen the backend's text status report
scm:global-diffOpen the current project diff
scm:commits-historyOpen history for the active path or project
scm:new-commitCheck for committable changes and open the message editor
scm:amend-current-commitOpen the current commit for amend
scm:pushPush using the backend's configured defaults
scm:manage-remotesOpen the Remotes tool
scm:merge-branchesChoose source, target, and merge strategy
scm:view-branchesOpen the standalone branches table
scm:create-branchCreate a branch from a selected base
scm:view-tagsOpen the standalone tags table
scm:create-tagCreate a tag at a selected commit

Fetch and pull are available through the workbench, and fetch also through Refresh From Remote in branch/tag lists. There are no corresponding global scm:fetch or scm:pull commands. Lua helpers with those names are a different interface from palette commands.

Document Commands​

CommandAction
scm:file-addAdd the current untracked file to source control
scm:file-removeRemove the path from source-control tracking using the backend
scm:file-revertConfirm restoring the tracked working file
scm:staging-addStage the current Git file
scm:staging-removeUnstage the current Git file
scm:file-diffOpen the current file's patch
scm:compare-with-headCompare the current file with its committed contents
scm:goto-previous-changeMove to the previous changed region
scm:goto-next-changeMove to the next changed region
scm:toggle-blameToggle current-line blame details
scm:view-blame-diffOpen the commit diff associated with the current line

The Git remove-from-tracking operation uses the index and keeps the working file. It is not an action for discarding that file's edits. Read confirmations and backend errors when using tracking or restore operations.

Default Shortcuts​

ActionShortcut
Open the workbenchctrl+shift+g
Previous document changectrl+alt+[
Next document changectrl+alt+]
Toggle blamectrl+alt+b
View current-line blame diffalt+b
Refresh the active workbenchf5
Next workbench list itemalt+down
Previous workbench list itemalt+up
Save a commit message and request confirmationctrl+s

These are plugin defaults. Your keymap and platform configuration can override them. Use Settings > Keybindings to inspect the active bindings.

Workbench Commands​

These apply while the workbench is active:

CommandAction
scm-workbench:refreshReload local repository state
scm-workbench:next-itemSelect the next list row and preview it
scm-workbench:previous-itemSelect the previous row and preview it

File/hunk/line actions, Viewed marks, conflict recovery, and remote operations are controls in the workbench. View Diff and a history-row double-click open the configured full viewer; a single click only changes the preview.

Standalone History Actions​

CommandContext-menu action
scm-history:view-diffView Diff
scm-history:copy-commit-hashCopy Commit Hash
scm-history:amend-current-commitAmend Current Commit, for the checkout commit
scm-history:cherry-pickCherry Pick Commit, for another commit
scm-history:compare-with-currentCompare With Current, for file history
scm-history:refreshRefresh the same history query

Double-clicking a commit opens its diff. A selected row is needed for commit-specific operations.

Standalone Branch Actions​

CommandContext-menu action
scm-branches:view-diffView Changes Diff
scm-branches:view-historyView Branch History
scm-branches:view-range-historyView Commits Not On Current Branch
scm-branches:copy-commit-hashCopy Commit Hash
scm-branches:checkoutCheckout Branch, also invoked by double-click
scm-branches:rebaseRebase Branch..., for a supported local branch
scm-branches:createCreate Branch
scm-branches:deleteDelete Branch
scm-branches:force-deleteForce Delete Branch
scm-branches:refreshRefresh local refs
scm-branches:refresh-from-remoteRefresh From Remote
scm-branches:push-remotePush branch..., on Git
scm-branches:delete-remoteDelete remote branch..., on Git
scm-branches:mergeMerge Branch..., when supported

Standalone Tag Actions​

CommandContext-menu action
scm-tags:view-diffView Changes Diff
scm-tags:view-historyView Tag History
scm-tags:copy-commit-hashCopy Commit Hash
scm-tags:checkoutCheckout Tag
scm-tags:createCreate Tag
scm-tags:editEdit Tag
scm-tags:deleteDelete Tag
scm-tags:refreshRefresh local tags
scm-tags:refresh-from-remoteRefresh From Remote
scm-tags:push-remotePush tag..., on Git
scm-tags:delete-remoteDelete remote tag..., on Git

Creation and refresh do not require a selected item. Item-specific actions do, and capability checks can further restrict their availability. Tree context menus provide project/path entry points to the same underlying SCM helpers.

Customize a Binding​

For example, add this to your user module to bind the branches list:

local keymap = require "core.keymap"

keymap.add {
["ctrl+shift+b"] = "scm:view-branches",
}

Check for existing bindings before assigning a shortcut. See Managing Keyboard Shortcuts for the keymap API and command predicates.