简体   繁体   中英

Filter To Show Files Ignored By Git In Visual Studio 2019 Solution Explorer

In Visual Studio 2019 when using git, files that are.gitignored have a red circle icon in Solution Explorer to indicate this. Is there a way I can filter the Solution Explorer to see only these files?

An extension would be an acceptable solution in my case if necessary.

I have three suggestions, none of which are exactly what you need but each of which just might provide some help...

  1. Write your own filter solution using this example as a start: https://docs.microsoft.com/en-us/visualstudio/extensibility/extending-the-solution-explorer-filter?view=vs-2019

  2. If it's possible to create a naming convention for your ignored files, then you can use the Solution Explorer's search text box (above the Solution tree) to filter by a string the includes your naming convention prefix/suffix, for example.

  3. If you have a large number of files you're excluding from Git then perhaps it's possible to place them all in their own folder--even if that folder remains in your solution tree (and perhaps it shouldn't?). That would make it possible to view them all in one place rather than need to filter everything in Solution Explorer--and is undeniably more convenient when it comes to managing those Git-ignored files.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM