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.

  • Git: How do I ignore matching directories in a sub directory?
  • Git connect using ssh on windows
  • Is it wise to use branching with one-man git project?
  • Can't find branch name in git config file
  • git checkout < branch > failure for local changes
  • Can git ignore specific commented debug code?
  • * 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

  • What .gitignore I should use with QT projects? (QT Creator)
  • Git stash removes added changes
  • When I try to upload new changeset, “resolving deltas” never ends
  • Mark repository as fork, if it has copied manully
  • Why do I get different results in git bash (msysgit) and git in cygwin?
  • What's the difference between 'Commit ID' and 'SHA1 Hash' in GIT?
  • 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.