Skip to content
| Marketplace
Sign in
Visual Studio Code>SCM Providers>Git Auto StageNew to Visual Studio Code? Get it now.
Git Auto Stage

Git Auto Stage

yyakovskind

|
7 installs
| (0) | Free
Automatically run git add -u on file save in Git repositories
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Git Auto Stage

A VS Code extension that automatically runs git add -u on every file save, but only if the workspace is a Git repository.

Features

  • 🚀 Automatic Staging: Automatically stages modified tracked files when you save
  • 🔍 Smart Detection: Only operates in Git repositories to avoid errors
  • ⚡ Lightweight: Minimal performance impact on your development workflow
  • 🔧 Configurable: Can be enabled/disabled via VS Code settings
  • 🛡️ Safe: Silent failures prevent interruption of your save operations

How It Works

When you save a file in VS Code, this extension:

  1. Checks if the current workspace is a Git repository
  2. If it is, runs git add -u to stage all modified tracked files
  3. Operates silently without disrupting your workflow

The git add -u command stages all modifications to files that are already tracked by Git, but doesn't add new untracked files.

Installation

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X)
  3. Search for "Git Auto Stage"
  4. Click Install

Configuration

The extension can be configured via VS Code settings:

{
  "gitAutoStage.enable": true  // Enable/disable automatic staging
}

Requirements

  • VS Code 1.60.0 or higher
  • Git installed and available in your PATH
  • Working in a Git repository

Extension Settings

This extension contributes the following settings:

  • gitAutoStage.enable: Enable/disable automatic git staging on file save

Known Issues

None at this time. If you encounter any issues, please report them on our GitHub repository.

Release Notes

1.0.0

Initial release of Git Auto Stage:

  • Automatic staging of modified files on save
  • Git repository detection
  • Configurable enable/disable setting
  • Silent error handling

Development

To set up the development environment:

# Clone the repository
git clone https://github.com/your-username/git-auto-stage.git
cd git-auto-stage

# Install dependencies
npm install

# Compile TypeScript
npm run compile

# Open in VS Code and press F5 to debug

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License.

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