Files
vscode/extensions/git
dependabot[bot] cbc25fffb2 build(deps): bump file-type from 16.5.4 to 21.3.1 in /extensions/git (#300597)
* build(deps): bump file-type from 16.5.4 to 21.3.1 in /extensions/git

Bumps [file-type](https://github.com/sindresorhus/file-type) from 16.5.4 to 21.3.1.
- [Release notes](https://github.com/sindresorhus/file-type/releases)
- [Commits](https://github.com/sindresorhus/file-type/compare/v16.5.4...v21.3.1)

---
updated-dependencies:
- dependency-name: file-type
  dependency-version: 21.3.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix(git): update file-type import for v21.x API (#301231)

* Initial plan

* fix: update file-type import for v21.x API changes

Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
2026-03-12 14:32:40 -07:00
..

Git integration for Visual Studio Code

Notice: This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled.

Features

See Git support in VS Code to learn about the features of this extension.

API

The Git extension exposes an API, reachable by any other extension.

  1. Copy src/api/git.d.ts to your extension's sources;

  2. Include git.d.ts in your extension's compilation.

  3. Get a hold of the API with the following snippet:

    const gitExtension = vscode.extensions.getExtension<GitExtension>('vscode.git').exports;
    const git = gitExtension.getAPI(1);
    

    Note: To ensure that the vscode.git extension is activated before your extension, add extensionDependencies (docs) into the package.json of your extension:

    "extensionDependencies": [
    	"vscode.git"
    ]