Skip to content
| Marketplace
Sign in
Visual Studio Code>SCM Providers>Hide Clean RepositoriesNew to Visual Studio Code? Get it now.
Hide Clean Repositories

Hide Clean Repositories

Gonzalo Guevara

|
1 install
| (0) | Free
Source Control shows only the Git repositories that have changes.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Hide Clean Repositories

Source Control shows only the Git repositories that have changes.

This helps in workspaces with many nested repositories, where most of them have nothing to commit.

How it works

  • A repository counts as changed when git status reports something: modified, staged or untracked files. Ignored and excluded files do not count.
  • The extension closes the other repositories, the same way Git: Close Repository does.
  • When a file changes inside a hidden repository, the extension checks it again and reopens it if it has changes. It also checks the hidden repositories when the window gets focus.
  • It only hides repositories that are inside a folder of the workspace.
  • A repository that you close yourself stays closed.

Commands

Command Effect
Hide Clean Repositories: Show All Repositories Reopens the hidden repositories and stops hiding.
Hide Clean Repositories: Hide Repositories Without Changes Starts hiding again.

The choice is remembered for each workspace. The commands are available while Git is enabled.

Before you disable or uninstall

Run Show All Repositories first, in each workspace where you used the extension. The built-in Git extension remembers closed repositories, so they stay closed after this extension is gone.

If it is already gone, run Git: Reopen Closed Repositories.

Limits

  • A repository with unpushed commits and no changed files stays hidden.
  • A repository that is already visible disappears when Git refreshes it. Git does that only while the window has focus, so a commit from an external terminal takes effect when you return to VS Code.
  • While a repository is hidden, its files have no Git marks in the editor gutter and no branch information, until a saved change brings it back.
  • The extension relies on the git.close and git.openRepository commands of the built-in Git extension. They are not part of its public API, so a VS Code update can break this extension.
  • It does not run in untrusted or virtual workspaces.

Troubleshooting

Open the Output panel and select Hide Clean Repositories to see which repositories were hidden or shown, and any git status errors. A repository whose status cannot be read stays tracked and is checked again later.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft