Integrations / VS Code extension
VS Code extension
Install the mergecat extension for VS Code and use its views, repository pages, commands and settings.
The mergecat extension brings the changeset view into VS Code: the history of a branch grouped by integration, the repository pages (branches, tags, pull requests, pipelines, deployments) as editor tabs, changeset blame, metrics and the change audit report. It signs in with the GitHub and Microsoft accounts VS Code already knows.
Requirements: VS Code 1.90 or newer and Git. The conflict check of the Branches page needs Git 2.38 or newer.
Install
Not on the Marketplace yet
The extension is not published on the Visual Studio Marketplace yet. Install it from the .vsix file of a release, or build it from source.
Download mergecat-vscode.vsix from the download section, then install it in one of two ways.
Command line:
code --install-extension mergecat-vscode.vsixVS Code: open the Extensions view, click the … menu at the top of the view, choose Install from VSIX… and select the file.
From the root of a clone of the mergecat repository (Node.js 20 or newer):
npm install
npm run vscode:installThe script builds and packages the extension and installs it into VS Code; it finds the code command even when it is not on the PATH. Run it again after changes. To remove the extension:
npm run vscode:install -- --uninstallThen run Developer: Reload Window, open a folder that contains a Git repository and click the mergecat icon in the activity bar.
A different extension with a similar name
“MergeCat for VS Code” (mergecat.mergecat-vscode) on the Marketplace is an unrelated extension that registers the same command and setting names. Do not install both. If it is installed, remove it:
code --uninstall-extension mergecat.mergecat-vscode Views
The mergecat activity bar icon opens three views.
Which repository? If the opened folder is inside a Git repository, that repository is shown. Otherwise mergecat searches its subfolders (two levels by default, mergecat.repositoryScanDepth). With one repository it opens it; with several it shows the last one used or the one of the file in the editor, or asks you to choose (also from the repository button in the title bar).
Changesets
The grouped history of the selected branch, in two layouts. Switch with List | Graph in the header, or with Show Commit Graph / Show Changesets List.
- List: direct commits as single rows, integrations (merges and, when connected, rebase-merged pull requests) as groups to expand. The second line of each row shows short SHA, author, date, risk and the environments that already contain the change. Click a commit to open its changes; use the row’s diff button or the context menu to open the combined changes of a group.
- Graph: every commit with its lanes; the chip on the second line tells which changeset brought the commit into the branch.
The header shows the repository and branch (click to switch), the search box, the active filters as removable chips, warnings, the number of entries and the connection state. Right-click a row for its actions: open changes, where did it enter, open the pull request, copy SHA. Keyboard: ↑ ↓ to move, ← → to collapse and expand, Enter to open.
Environments
What is deployed where, and which integrations of the branch are not deployed there yet. Click an entry to reveal it; the inline action switches the Changesets view to “what is not yet in this environment”.
An environment is a branch that points at the deployed code (for example origin/production) or a tag pattern whose newest tag is the deployed version (for example prod-*). Without configuration, branches named production, staging, test or develop and release tags are detected; with a connection, the latest successful deployments of the hosting service are added. Configure them with mergecat.environments.definitions:
"mergecat.environments.definitions": [
{ "name": "Production", "tagPattern": "prod-*" },
{ "name": "Staging", "ref": "origin/staging" }
]
Connections
The hosting connectors (GitHub, GitLab, Azure DevOps; Bitbucket coming soon), how each one is signed in, and what connecting adds. The repository’s remote decides which connector is used.
Repository pages
Five pages open as editor tabs: from the buttons under the Changesets header (Branches · Tags · PRs · Pipelines · Deploys), from the view’s … menu, or with the mergecat: Open … commands.
| Page | What it shows | Connection |
|---|---|---|
| Branches | Every local branch and the remote branches without a local copy: incoming and outgoing commits, not on origin, upstream deleted, ahead/behind the base, merged, conflicts with the base (files listed), age. Fetch runs git fetch --all --prune --tags. | Local |
| Tags | Name, commit, date, tagger, message, annotated or lightweight, version, on origin or local only with a Push button. New tag checks the name as you type and can push the tag. | Local |
| Pull Requests | Open, closed or all, with state, reviewers and votes, checks; details with commits and linked issues. New pull request prefills title and description from the commits. | Connected |
| Pipelines | GitHub Actions, GitLab CI/CD and Azure Pipelines: Activity (stages, jobs, steps, dependencies), Text (the YAML) and Runs (status and duration of every job). | Connected |
| Deployments | The live deployment of each environment and the previous ones with their tags; Compare environments with release notes and the audit report; what each deployment brought. | Connected |
Without a connection, the Deployments page shows the environments found locally (settings, branch and tag names) and compares them the same way.
Insights
- Changeset blame: mergecat: Toggle Changeset Blame (also in the editor title bar) annotates the line under the cursor with the integration that brought it into the analysed branch: pull request or merged branch, title, date and the environments it reached. The hover adds the commit, the integrator, approvals and linked issues (connected), the first release tag and the risk.
- Changesets That Shaped This File lists the integrations that wrote the current file, largest share first.
- Risk per integration: a score from size, many files, sensitive areas, code changed without tests, direct commits and local merges without pull request, merges without approval (connected) and reverts. Filter with Filter… › Risk…. The factors are listed in Change audit reports.
- Metrics: mergecat: Show Metrics shows changes entered, share via pull request, lead time, change size, reverts, authors, activity per week or month, risk distribution and top contributors. Connected to GitHub it adds the time to merge.
Audit report
Run mergecat: Export Audit Report… (Command Palette or the Changesets view’s … menu) and choose the scope: the current view, Between two releases…, Between two environments… or Not yet in an environment. Choose HTML, Markdown, CSV or JSON and where to save it. The Deployments page offers the same report for the changes of Compare environments.
Approvals come from the hosting service: without a connection the command warns that they will be reported as “unknown” and offers to connect. Details: Change audit reports.
Sign-in per service
Connect from the Connections view, the Local only · Connect pill in the Changesets header, or mergecat: Connect….
| Service | Sign-in | Notes |
|---|---|---|
| GitHub (github.com) | VS Code’s GitHub account | Organisation SSO included; scope repo; the token stays in VS Code |
| Azure DevOps (dev.azure.com) | Sign in with Microsoft with VS Code’s Microsoft account | Works when the Azure DevOps organisation is connected to Microsoft Entra ID (work or school account) |
| Azure DevOps (alternative, also Azure DevOps Server) | Personal access token | Scopes Code (Read & write), Build (Read), Environment (Read & manage), Work Items (Read) |
| GitLab (gitlab.com) | Personal access token | Scope api (read_api is enough to read; api is needed to create merge requests) |
| GitLab (optional) | Sign in with GitLab in the browser (GitLab 17.2 or newer) | Needs the application ID of a non-confidential OAuth application in mergecat.gitlab.clientId |
Personal access tokens and GitLab sign-in tokens are stored in VS Code’s SecretStorage, one per service and host, and never in settings or logs. Disconnect from the Connections view. See also Security and privacy.
Commands
All commands are in the Command Palette under mergecat:.
| Command | What it does |
|---|---|
| Select Repository… | Choose the repository when there are several |
| Select Branch… | Choose the branch, remote branch or tag to analyse; also from the status bar |
| Filter… / Clear Filter | Text (subject, SHA, branch, pull request), author, date range, risk; matches commits inside groups too |
| Show/Hide Forward-Integration Merges | Toggle the “main into feature” merges inside groups |
| Show Commit Graph / Show Changesets List | Switch between graph and list |
| Compare Two Refs… | What entered between two releases, tags or commits, grouped the same way |
| Export… | Markdown, CSV or HTML changelog of the current view |
| Where Did This Commit Enter? | The integration that brought a commit into the branch and the first tag that contains it |
| Open Commit Changes / Open Combined Changes | Diff of a commit, or of a whole group, in VS Code’s diff editor |
| Open Pull Request / Copy Commit SHA | Row actions |
| Connect… / Disconnect… | Sign in to GitHub, GitLab or Azure DevOps, or forget the credentials (Connect GitHub and Disconnect GitHub also exist) |
| Open Branches / Open Tags / Open Pull Requests / Open Pipelines / Open Deployments | Open a repository page |
| Fetch All Remotes | git fetch --all --prune --tags, then refresh |
| Create Tag… / Create Tag Here… | The “New tag” form on the head of the analysed branch or on the selected row |
| Create Pull Request… | The “New pull request” form |
| Toggle Changeset Blame | Annotate the current line with the integration that brought it in |
| Changesets That Shaped This File | Integrations that wrote the current file |
| Show Metrics | Flow metrics for a period |
| Export Audit Report… | Audit of the current view, a release range, two environments or the next deployment |
| Configure Environments… / Refresh Environments | Edit or reload the environments |
| Show What Is Not Yet Deployed Here | Switch the Changesets view to what an environment does not run yet |
| Refresh / Load More | Re-read the history; load the next page of entries |
Settings
| Setting | Default | Description |
|---|---|---|
mergecat.gitPath | empty | Git executable. Empty: the built-in Git extension’s git.path, then the usual install locations |
mergecat.pageSize | 200 | Top-level entries loaded at a time (20 to 5000) |
mergecat.hideForwardIntegrationMerges | true | Hide the merges of the main branch into a feature branch inside groups |
mergecat.defaultBranch | empty | Branch analysed when a repository opens, e.g. origin/main. Empty: the remote default branch, then main/master, then the current branch |
mergecat.repositoryScanDepth | 2 | Levels of subfolders searched for repositories when the opened folder is not a repository (0 to 5; 0 = only the opened folder) |
mergecat.environments.definitions | [] | Environments: { "name", "ref" } or { "name", "tagPattern" } |
mergecat.environments.autoDetect | true | Guess environments from branch names and release tags when none are configured |
mergecat.risk.sensitiveAreas | [] | Replace the default sensitive areas of the risk score; each item { "id", "label", "points", "patterns" }. Empty: defaults |
mergecat.risk.testPatterns | [] | Globs of test files for the “no tests changed” factor. Empty: defaults |
mergecat.gitlab.clientId | empty | Application ID of a GitLab OAuth application for Sign in with GitLab. Empty: personal access token |
Example of custom sensitive areas:
"mergecat.risk.sensitiveAreas": [
{ "id": "billing", "label": "Billing", "points": 3, "patterns": ["src/billing/**"] }
]
Differences from the desktop app
Both apps read the same history with the same engine and have the same repository pages. The differences:
| VS Code extension | Desktop app | |
|---|---|---|
| Changesets view | Sidebar view, diffs in VS Code’s diff editor | Full window with details panel |
| Changeset blame, Changesets That Shaped This File | yes | no |
| Metrics panel | yes | no |
| Risk and environments on each row | yes | no |
| Environment definitions | mergecat.environments.definitions | from the hosting service’s deployments |
| Environments column in the audit report | filled | empty |
| GitHub sign-in | VS Code’s GitHub account | Sign in with GitHub (OAuth app), GitHub CLI or token |
| Azure DevOps sign-in | VS Code’s Microsoft account or token | Sign in with Microsoft (Entra ID app) or token |
| Credential storage | VS Code accounts and SecretStorage | Operating system keychain |
For the desktop app, see Installation and History. Known limits of both are on Limits and integration styles.