What does the small preceding red minus icon mean in my Visual Studio Solution Explorer?

According to the version control icon documentation, it indicates files that have been excluded from version control, for example in the .gitingore file.

Icon for excluded from version control

However, in my case with Visual Studio Community 2015 Update 2, those icons also show up when I create a new project. Even if none of the created files are explicitly ignored through .gitignore. The icons disappear once I've committed the changes.


When you create a visual studio project and select the "add to source control" option and you are using Git, Visual studio automatically generates a .gitignore file.

The .gitignore file contains a large amount extensions and directories. For instance:

  1. User-Specific files such as *.suo, *.user etc.
  2. Build Results, DNS artifacts
  3. Profiler, Resharper, JustCode and TeamCity and many other add-ins artifacts
  4. SQL Server files *.mdf and *.ldf

I think you get the idea, you can open the .gitignore and view it yourself.

You can right-click on the file that is being ignored and include it in your source if you wish.

This is the behaviour in Visual Studio 2015. I haven't confirmed if this is the behaviour in previous Visual Studio editions.


For those who are getting this on Visual Studio 2019, I found that clicking on "Add Ignored File File to Source Control" under Source Control solved this for me and finally added the files for commit on my Git repository:

Add Ignored File