UNPKG

687 BMarkdownView Raw
1# Git integration for Visual Studio Code
2
3**Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled.
4
5## Features
6
7See [Git support in VS Code](https://code.visualstudio.com/docs/editor/versioncontrol#_git-support) to learn about the features of this extension.
8
9## API
10
11The Git extension exposes an API, reachable by any other extension.
12
131. Copy `src/api/git.d.ts` to your extension's sources;
142. Include `git.d.ts` in your extension's compilation.
153. Get a hold of the API with the following snippet:
16
17 ```ts
18 const gitExtension = vscode.extensions.getExtension<GitExtension>('vscode.git').exports;
19 const git = gitExtension.getAPI(1);
20 ```
\No newline at end of file