Skip to content

Extending

Custom commands (gitCheckout.customCommands) appear in Git Checkout: Quick Launch and Git Checkout: Run Custom Command…. Each entry has a name, a context (branch, file, submodule, or url), and a command. Placeholders are ${branch}, ${file}, ${submodule}, ${url}, ${repo}, and ${sha}. A url command that expands to http or https opens in the browser, which covers pull requests on forges without a built-in integration. Other commands run in the integrated terminal with the repository as the working directory, on the workspace host.

External diff and merge stay off so the editor remains the default. Enable gitCheckout.externalDiff.enabled or gitCheckout.externalMerge.enabled, then run Git Checkout: Open External Diff or Git Checkout: Open External Merge. Those commands run git difftool or git mergetool on the workspace host. Set diff.tool / diff.guitool or merge.tool / merge.guitool first. On Remote SSH, WSL, or Dev Containers the GUI tool must be installed on that host; a tool that exists only on your local machine will not open.

Gitignore: Git Checkout: Add .gitignore Template… appends a built-in template to the repository .gitignore. Git Checkout: Add to .gitignore appends the Explorer selection, or a pattern you type.