Post

Show the .git Folder in VSCode

Quick steps to surface the hidden .git folder in VSCode when you need it.

Show the .git Folder in VSCode

By default Cursor, VSCode, or Windsurf comes with not showing the .git folder settings, but sometimes you might need to see that.

Show .git via settings.json

  1. Open Settings.
    • macOS: press + ,
    • Windows/Linux: press Ctrl + ,
    • Or run Preferences: Open Settings (JSON) from the Command Palette.
  2. In settings.json, add:

    1
    2
    3
    
    "files.exclude": {
      "**/.git": false
    }
    
  3. Save the file and the .git folder appears instantly in the Explorer.

Use the GUI toggle instead

  1. Keep Settings open and search for Files: Exclude.
  2. Locate the **/.git entry under Workspace Settings.
  3. Click the X icon to remove the exclusion so the folder becomes visible.

Show only the parts you need

If you just want a few Git internals (for example, the repo config file) you can keep the rest hidden:

1
2
3
4
"files.exclude": {
  "**/.git": false,
  "**/.git/{objects,logs,refs,index}": true
}

That leaves the sensitive plumbing hidden while surfacing the pieces you actually need to inspect.

☕ Support My Work

If you found this post helpful and want to support more content like this, you can buy me a coffee!

Your support helps me continue creating useful articles and tips for fellow developers. Thank you! 🙏

This post is licensed under CC BY 4.0 by the author.