Closed natemcmaster closed 5 years ago
Issues with git clean -xdf
:
.dotnet/
which can take a few minutes to reinstall. Deleting .dotnet/
also frequently fails due to background dotnet.exe processes..tools/
(Java) which doesn't reinstall itself by default (https://github.com/aspnet/AspNetCore/pull/10306)git reset --hard
.Nate's suggestion:
git config --global alias.cleanme 'clean -xfd -e .dotnet -e .tools -e src/SignalR/clients/ts/FunctionalTests/node_modules/'
Another issue with -xfd
: it force deletes all your files. Maybe the interactive version would be better? -ixd
Hmm
d:\github\AspNetCore>git clean -ixd
Would remove the following items:
.dotnet/
.vs/
artifacts/
build/tasks/bin/
eng/tools/BaselineGenerator/bin/
eng/tools/BaselineGenerator/obj/
obj/
src/Analyzers/Analyzers/test/bin/
src/Components/Analyzers/src/bin/
src/Components/Analyzers/src/obj/
src/Components/Analyzers/test/bin/
src/Components/Analyzers/test/obj/
src/Components/Blazor/Blazor/ref/bin/
src/Components/Blazor/Blazor/ref/obj/
src/Components/Blazor/Blazor/src/bin/
src/Components/Blazor/Blazor/src/obj/
src/Components/Blazor/Blazor/test/bin/
src/Components/Blazor/Blazor/test/obj/
src/Components/Blazor/BlazorExtension/src/bin/
src/Components/Blazor/BlazorExtension/src/obj/
src/Components/Blazor/Build/src/bin/
src/Components/Blazor/Build/src/obj/
src/Components/Blazor/Build/test/bin/
src/Components/Blazor/Build/test/obj/
src/Components/Blazor/DevServer/src/bin/
src/Components/Blazor/DevServer/src/obj/
src/Components/Blazor/Server/ref/bin/
src/Components/Blazor/Server/ref/obj/
src/Components/Blazor/Server/src/bin/
src/Components/Blazor/Server/src/obj/
src/Components/Blazor/Templates/src/bin/
src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/.template.config/
src/Components/Blazor/Templates/src/content/BlazorLibrary-CSharp/.template.config/
src/Components/Blazor/Templates/src/content/BlazorStandalone-CSharp/.template.config/
src/Components/Blazor/Templates/src/obj/
src/Components/Blazor/testassets/HostedInAspNet.Client/bin/
src/Components/Blazor/testassets/HostedInAspNet.Client/obj/
src/Components/Blazor/testassets/HostedInAspNet.Server/bin/
src/Components/Blazor/testassets/HostedInAspNet.Server/obj/
src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/bin/
src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/obj/
src/Components/Blazor/testassets/MonoSanity/bin/
src/Components/Blazor/testassets/MonoSanity/obj/
src/Components/Blazor/testassets/MonoSanityClient/bin/
src/Components/Blazor/testassets/MonoSanityClient/obj/
src/Components/Blazor/testassets/StandaloneApp/bin/
src/Components/Blazor/testassets/StandaloneApp/obj/
src/Components/Browser.JS/node_modules/
src/Components/Browser/ref/bin/
src/Components/Browser/ref/obj/
src/Components/Browser/src/bin/
src/Components/Browser/src/obj/
src/Components/Components/perf/bin/
src/Components/Components/perf/obj/
src/Components/Components/ref/bin/
src/Components/Components/ref/obj/
src/Components/Components/src/bin/
src/Components/Components/src/obj/
src/Components/Components/test/bin/
src/Components/Components/test/obj/
src/Components/Server/ref/bin/
src/Components/Server/ref/obj/
src/Components/Server/src/bin/
src/Components/Server/src/obj/
src/Components/Server/test/bin/
src/Components/Server/test/obj/
src/Components/test/E2ETest/bin/
src/Components/test/E2ETest/node_modules/
src/Components/test/E2ETest/obj/
src/Components/test/testassets/BasicTestApp/bin/
src/Components/test/testassets/BasicTestApp/obj/
src/Components/test/testassets/ComponentsApp.App/bin/
src/Components/test/testassets/ComponentsApp.App/obj/
src/Components/test/testassets/ComponentsApp.Server/bin/
src/Components/test/testassets/ComponentsApp.Server/obj/
src/Components/test/testassets/TestContentPackage/bin/
src/Components/test/testassets/TestContentPackage/obj/
src/Components/test/testassets/TestServer/bin/
src/Components/test/testassets/TestServer/obj/
src/DefaultBuilder/test/Microsoft.AspNetCore.FunctionalTests/bin/
src/DefaultBuilder/testassets/CreateDefaultBuilderApp/Properties/
src/DefaultBuilder/testassets/CreateDefaultBuilderApp/bin/
src/DefaultBuilder/testassets/CreateDefaultBuilderOfTApp/bin/
src/DefaultBuilder/testassets/DependencyInjectionApp/bin/
src/DefaultBuilder/testassets/StartRequestDelegateUrlApp/bin/
src/DefaultBuilder/testassets/StartRouteBuilderUrlApp/bin/
src/DefaultBuilder/testassets/StartWithIApplicationBuilderUrlApp/bin/
src/Hosting/test/FunctionalTests/bin/
src/Hosting/test/testassets/IStartupInjectionAssemblyName/bin/
src/Hosting/test/testassets/Microsoft.AspNetCore.Hosting.TestSites/bin/
src/Hosting/test/testassets/TestStartupAssembly1/bin/
src/Http/.vs/
src/Http/Routing/test/testassets/Benchmarks/Benchmarks.csproj.user
src/Http/Routing/test/testassets/Benchmarks/Properties/
src/Http/Routing/test/testassets/RoutingSandbox/Properties/
src/Http/Routing/test/testassets/RoutingSandbox/RoutingSandbox.csproj.user
src/Http/Routing/test/testassets/RoutingWebSite/Properties/
src/Http/Routing/test/testassets/RoutingWebSite/RoutingWebSite.csproj.user
src/Middleware/.vs/
src/Middleware/CORS/samples/SampleDestination/Properties/
src/Middleware/CORS/samples/SampleDestination/SampleDestination.csproj.user
src/Middleware/CORS/samples/SampleDestination/bin/
src/Middleware/CORS/samples/SampleOrigin/Properties/
src/Middleware/CORS/samples/SampleOrigin/SampleOrigin.csproj.user
src/Middleware/CORS/samples/SampleOrigin/bin/
src/Middleware/CORS/test/FunctionalTests/bin/
src/Middleware/CORS/test/FunctionalTests/node_modules/
src/Middleware/CORS/test/testassets/CorsMiddlewareWebSite/CorsMiddlewareWebSite.csproj.user
src/Middleware/CORS/test/testassets/CorsMiddlewareWebSite/Properties/
src/Middleware/CORS/test/testassets/CorsMiddlewareWebSite/bin/
src/Middleware/Diagnostics/test/testassets/DatabaseErrorPageSample/DatabaseErrorPageSample.csproj.user
src/Middleware/Diagnostics/test/testassets/DatabaseErrorPageSample/Properties/
src/Middleware/Diagnostics/test/testassets/DeveloperExceptionPageSample/DeveloperExceptionPageSample.csproj.user
src/Middleware/Diagnostics/test/testassets/DeveloperExceptionPageSample/Properties/
src/Middleware/Diagnostics/test/testassets/ExceptionHandlerSample/ExceptionHandlerSample.csproj.user
src/Middleware/Diagnostics/test/testassets/ExceptionHandlerSample/Properties/
src/Middleware/Diagnostics/test/testassets/StatusCodePagesSample/Properties/
src/Middleware/Diagnostics/test/testassets/StatusCodePagesSample/StatusCodePagesSample.csproj.user
src/Middleware/Diagnostics/test/testassets/WelcomePageSample/Properties/
src/Middleware/Diagnostics/test/testassets/WelcomePageSample/WelcomePageSample.csproj.user
src/Middleware/HeaderPropagation/samples/HeaderPropagationSample/HeaderPropagationSample.csproj.user
src/Middleware/HeaderPropagation/samples/HeaderPropagationSample/Properties/
src/Middleware/HttpOverrides/src/Microsoft.AspNetCore.HttpOverrides.csproj.user
src/Middleware/Localization/sample/LocalizationSample.csproj.user
src/Middleware/Localization/sample/Properties/
src/Middleware/Localization/testassets/LocalizationWebsite/LocalizationWebsite.csproj.user
src/Middleware/Localization/testassets/LocalizationWebsite/Properties/
src/Middleware/MiddlewareAnalysis/samples/MiddlewareAnalysisSample/MiddlewareAnalysisSample.csproj.user
src/Middleware/MiddlewareAnalysis/samples/MiddlewareAnalysisSample/Properties/
src/Middleware/NodeServices/samples/NodeServicesExamples/node_modules/
src/Middleware/NodeServices/src/node_modules/
src/Middleware/NodeServices/test/bin/
src/Middleware/RequestThrottling/sample/Properties/
src/Middleware/RequestThrottling/sample/RequestThrottlingSample.csproj.user
src/Middleware/ResponseCaching/samples/ResponseCachingSample/Properties/
src/Middleware/ResponseCaching/samples/ResponseCachingSample/ResponseCachingSample.csproj.user
src/Middleware/Session/samples/Properties/
src/Middleware/Session/samples/SessionSample.csproj.user
src/Middleware/SpaServices/samples/Webpack/Properties/
src/Middleware/SpaServices/samples/Webpack/Webpack.csproj.user
src/Middleware/SpaServices/samples/Webpack/node_modules/
src/Middleware/SpaServices/src/node_modules/
src/Middleware/StaticFiles/samples/StaticFileSample/Properties/
src/Middleware/StaticFiles/samples/StaticFileSample/StaticFileSample.csproj.user
src/Middleware/WebSockets/samples/TestServer/bin/
src/Middleware/WebSockets/test/ConformanceTests/AutobahnTestApp/AutobahnTestApp.csproj.user
src/Middleware/WebSockets/test/ConformanceTests/AutobahnTestApp/Properties/
src/Mvc/Mvc.Analyzers/test/bin/
src/Mvc/Mvc.Api.Analyzers/test/bin/
src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-CSharp/Company.WebApplication1.csproj
src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-FSharp/Company.WebApplication1.fsproj
src/ProjectTemplates/Web.ProjectTemplates/content/GrpcService-CSharp/GrpcService-CSharp.csproj
src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/Company.RazorClassLibrary1.csproj
src/ProjectTemplates/Web.ProjectTemplates/content/RazorComponentsWeb-CSharp/RazorComponentsWeb-CSharp.csproj
src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Company.WebApplication1.csproj
src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Company.WebApplication1.csproj
src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/Company.WebApplication1.fsproj
src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/Company.WebApplication1.csproj
src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-FSharp/Company.WebApplication1.fsproj
src/ProjectTemplates/Web.ProjectTemplates/content/Worker-CSharp/Company.Application1.csproj
src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Company.WebApplication1.csproj
src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Company.WebApplication1.csproj
src/ProjectTemplates/Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/Company.WebApplication1.csproj
src/ProjectTemplates/test/bin/
src/ProjectTemplates/test/node_modules/
src/Security/.vs/
src/Security/Authentication/Negotiate/samples/NegotiateAuthSample/NegotiateAuthSample.csproj.user
src/Security/CookiePolicy/samples/CookiePolicySample/CookiePolicySample.csproj.user
src/Security/CookiePolicy/samples/CookiePolicySample/Properties/
src/Servers/.vs/
src/Servers/HttpSys/.vs/
src/Servers/HttpSys/samples/TestClient/bin/
src/Servers/IIS/.vs/
src/Servers/IIS/IIS/samples/NativeIISSample/Properties/
src/Servers/IIS/IIS/test/Common.Tests/bin/
src/Servers/IIS/IIS/test/IIS.BackwardsCompatibility.FunctionalTests/bin/
src/Servers/IIS/IIS/test/IIS.ForwardsCompatibility.FunctionalTests/bin/
src/Servers/IIS/IIS/test/IIS.FunctionalTests/bin/
src/Servers/IIS/IIS/test/IIS.Tests/Properties/
src/Servers/IIS/IIS/test/IIS.Tests/bin/
src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/bin/
src/Servers/IIS/IIS/test/testassets/InProcessForwardsCompatWebSite/Properties/
src/Servers/IIS/IIS/test/testassets/InProcessForwardsCompatWebSite/bin/
src/Servers/IIS/IIS/test/testassets/InProcessWebSite/Properties/
src/Servers/IIS/IIS/test/testassets/InProcessWebSite/bin/
src/Servers/IIS/IIS/test/testassets/OutOfProcessWebSite/Properties/
src/Servers/IIS/IIS/test/testassets/OutOfProcessWebSite/bin/
src/Servers/IIS/IIS/test/testassets/StressTestWebSite/Properties/
src/Servers/IIS/IIS/test/testassets/StressTestWebSite/bin/
src/Servers/IIS/IIS/test/testassets/TestTasks/bin/
src/Servers/IIS/IISIntegration/samples/IISSample/IISSample.csproj.user
src/Servers/IIS/IISIntegration/samples/IISSample/Properties/
src/Servers/IIS/IISIntegration/src/Microsoft.AspNetCore.Server.IISIntegration.csproj.user
src/Servers/test/FunctionalTests/bin/
src/Servers/testassets/ServerComparison.TestSites/Properties/
src/Servers/testassets/ServerComparison.TestSites/bin/
src/SignalR/clients/ts/FunctionalTests/node_modules/
src/SignalR/clients/ts/common/node_modules/
src/SignalR/clients/ts/node_modules/
src/SignalR/clients/ts/signalr-protocol-msgpack/node_modules/
src/SignalR/clients/ts/signalr/node_modules/
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
Yeah. Then you type c + ENTER
852680f61825
Request from @Tratcher
Add a script to clean the repo.
Open questions to resolve first:
git clean -xfd
? Or should it behave more like like "Clean Solution" in VS?