Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Git - Stage/unstage specific filesNew to Visual Studio Code? Get it now.
Git - Stage/unstage specific files

Git - Stage/unstage specific files

Daniel Grefberg

|
586 installs
| (0) | Free
Commands for staging and unstaging specific files from outside the source control window.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

git-stage 🗄️

vscode-badge version last-updated

A VSCode extension for staging/unstaging files without changes from outside of the source control window.

command-palette-example

Table of Contents

  • Features
    • Wait, isn't this already included in VSCode's default Git integration?
  • Commands
    • Command palette
    • Explorer view - context menu
  • Extension settings

Features

  • Stage/unstage files with or without changes, directly from the explorer or currently opened file.
  • Integrates seamlessly with the default Git integration.

Wait, isn't this already included in VSCode's default Git integration?

Sort of, but not really. The default Git integration only provides commands to stage/unstage files with changes, unless you do it from the Source Control window.

This can be really annoying in situations where you have a lot of untracked files (e.g. when working with bare git repos for dotfiles), in which case it is a lot more convenient to stage files directly from the explorer view.

The Git integration does however expose all the necessary APIs to achieve this under the hood, which is what this extension is using.

Commands

Command palette

  • Git: Stage Current File
    Stages the file currently opened in the editor.

  • Git: Unstage Current File
    Unstages the file currently opened in the editor.

Explorer view - context menu

  • Git: Stage Selected Files
    Stages the file(s) selected in the explorer.

  • Git: Unstage Selected Files
    Unstages the file(s) selected in the explorer.

Extension settings

None, so far.

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