Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>GitDriftNew to Visual Studio Code? Get it now.
GitDrift

GitDrift

sanjay-subramanya

|
1 install
| (0) | Free
Instantly detect staleness by comparing your local working branch against the remote upstream.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

GitDrift for VS Code

A VS Code interface for the drift CLI. This extension provides visual status indicators and a summary of branch staleness compared to a remote upstream.

Important: CLI Wrapper

This extension is a UI wrapper and does not contain the detection logic itself. It executes the drift binary found in your system PATH.

  • Requirement: Ensure the drift CLI is installed and available on your PATH before using the extension.
  • Execution environment: Commands are executed in the root directory (cwd) of the first active workspace folder.

Install the Drift CLI

Run the following commands to install the drift CLI on your system:

  • Windows (PowerShell):
iwr https://raw.githubusercontent.com/sanjay-subramanya/drift/main/install.ps1 | iex
  • MacOS / Linux (Shell):
curl -sSL https://raw.githubusercontent.com/sanjay-subramanya/drift/main/install.sh | sh

After installing the CLI and adding the parent directory of the binary to your PATH, restart VS Code.

Features

  • Activity Bar (left)
    • Access Drift via the dedicated icon in your Activity Bar.
  • Interactive Setup View
    • A clean, "Welcome View" interface where you can configure your analysis before running it.
    • List of files causing drift, categorized by severity.
  • Status Bar
    • Drift: Idle / Ready state.
    • Analyzing...: Real-time execution feedback.
    • Up to Date: No high-priority drift detected.
    • Workspace Stale: Upstream changes detected.
    • Drift Error: CLI or configuration failure.

How It Works

  1. Configuration: Use the Drift Sidebar to verify or set your parameters:
    • Base Branch: The remote reference (e.g., origin/main).
    • JSON Mode: Toggle for structured data output.
    • Path: Restrict analysis to a specific directory.
  2. Action: Click the Check for Upstream Changes button in the sidebar.
  3. Review: The extension triggers the drift CLI. All results are streamed directly to the Drift Output Channel.

Extension Command

  • Drift: Analyze Branch Drift
    • Command ID: drift.run
    • Access Points:
      • The Check for Upstream Changes button in the sidebar.
      • The Status Bar button (bottom right).
      • The "Sync" icon in the Drift view title bar.

Configuration

You can customize the default values in your VS Code settings (settings.json or the Settings UI):

  • drift.base: Default remote branch (Default: origin/main).
  • drift.json: Enable JSON output mode (Default: false).
  • drift.path: Default sub-path for analysis (Default: empty).

Typical Workflow

  1. Open a Git repository in VS Code.
  2. Navigate to the fuzzy search icon in the Activity Bar icon.
  3. Check that the displayed settings (Base, JSON, Path) match your needs.
  4. Click the blue Check for Upstream Changes button.
  5. The Output Panel will automatically focus, displaying the categorized drift:
    • 🔥 [CRITICAL]: Conflicts found in files currently being edited.
    • ⚠️ [HIGH]: Changes in deployment or dependency files.
    • ℹ️ [LOW]: Minor upstream updates.

Troubleshooting

  • "Drift Error":
    • Verify that the drift CLI is installed and accessible in your system's PATH.
    • Check the Drift Output Channel for the specific CLI error message.
  • Output Channel Visibility:
    • If the output doesn't pop up automatically, go to View > Output and select Drift from the dropdown menu.
  • JSON Recorded Message:
    • If JSON mode is enabled, the CLI saves results to a file. The extension will report "JSON output recorded" in the channel; check your specified path for the data file.

Technical Details

  • Iconography:
    • Status updates use standard VS Code ThemeIcons for a native look and feel.
  • Filtering:
    • While the raw output prints everything, the Status Bar only turns "Warning" (Stale) if [CRITICAL] or [HIGH] items are detected.

Version: 0.1.0
Publisher: sanjay-subramanya

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft