Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Git Explorer ExtensionNew to Visual Studio Code? Get it now.
Git Explorer Extension

Git Explorer Extension

liwei.0831

|
2 installs
| (0) | Free
An extension that adds Git options to the Explorer context menu
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Git Explorer Extension

This VS Code extension adds Git options to the Explorer context menu.

Features

  • Adds a "Git" option to the right-click context menu in the Explorer
  • Includes submenu with the following Git operations:
    • Commit File (opens Source Control view)
    • +Add (adds untracked files or directories to git)
    • Annotate With Git Blame
    • Show Diff
    • Compare with Revision
    • Compare With Branch Or Tag
    • Show History
    • Rollback
    • Push
    • Pull
    • Fetch
    • Merge
    • Rebase
    • Abort
    • +New Branch
    • New Tag

Installation

  1. Clone this repository
  2. Run npm install to install dependencies
  3. Run npm run compile to compile the TypeScript code
  4. Open the project in VS Code
  5. Press F5 to launch the extension in a new Extension Development Host window

Usage

  1. Right-click on any file in the Explorer
  2. Select "Git" from the context menu
  3. Choose from the available Git operations:
    • Commit File: Opens the Source Control view in VS Code
    • +Add: Adds untracked files or directories to git. Only available for files or directories not yet tracked by git. When selected, the file or all files in the directory will be added to git management.
    • Annotate With Git Blame: Shows git blame annotations for the selected file
    • Show Diff: Shows the diff for the selected file
    • Compare with Revision: Compares the selected file with a specific revision
    • Compare With Branch Or Tag: Compares the selected file with a branch or tag
    • Show History: Shows the git history for the selected file
    • Show Current Revision: Shows the current revision of the selected file
    • Rollback: Rolls back the selected file to a previous revision
    • Push: Pushes changes to the remote repository
    • Pull: Pulls changes from the remote repository
    • Fetch: Fetches changes from the remote repository
    • Merge: Merges changes from another branch
    • Rebase: Rebases the current branch on top of another branch
    • Abort: Aborts a conflicting rebase or merge operation
    • +New Branch: Creates a new branch and switches to it. Prompts the user for the branch name.
    • New Tag: Creates a new tag. Prompts the user for the tag name.

Development

  1. Install dependencies: npm install
  2. Compile TypeScript: npm run compile
  3. Run the extension in VS Code debugger

Note: The actual Git functionality is not implemented in this basic version and would require integration with Git commands or libraries.

Implementation Details

The extension is implemented in TypeScript and compiled to JavaScript. The key files are:

  • package.json: Extension manifest file that defines the extension's metadata, contributes commands and menus
  • src/extension.ts: Main extension file that registers commands and implements functionality
  • tsconfig.json: TypeScript configuration file
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft