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

Recently a preceding small red icon started to appear before some of my VS 2015 Solution Explorer. I definitely remember it was not there some days before.

I think it has something to do with git source control what I am using (not sure), but can not figure what is it.

* edit *

Added more diagnostics:

  • The files can be opened by double click
  • The tracking does not work for these files (I mean not activated in Solution Explorer when switching to the editor tab for that file)
  • Editing and saving does not help
  • Close/Reopen VS does not help
  • Refresh does not help

* end edit *

enter image description here

  • Set proxy for Microsoft Git Provider in Visual Studio
  • Cannot install bower packages in my new ASP.NET application
  • git not working with visual studio > file > new > web site …
  • VS 2013 Git integration - customize compare with unmodified option?
  • Visual Studio 2013 and Github account authentication not working
  • Visual Studio keeps changing project.sln file
  • Is it possible to make Visual Studio change the project's Platform Toolset automatically?
  • Git: Branch of Branch is not fully Rendering CSS
  • 3 Solutions collect form web for “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.

    I think I managed to figure out what is going on here.

    The (-) symbols next to each of your files/projects represent files that are ignored by .gitignore.

    From what I am seeing in your project, this would mean that you ignored the files in your .build and .misc folders.

    As for the (-) symbol next to your solution, I think this means that you have also ignored your .sln in your .gitignore file.

    Likewise, if you were to add the .csproj files in your .gitignore, I would expect a (-) symbol next to your projects like Sliders.Core.Test.

    Hope this helps.

    Git Baby is a git and github fan, let's start git clone.